Di0n
Di0n
CC#
Created by Di0n on 5/26/2023 in #help
❔ Random Empty Column is shown in the DataGrid
5 replies
CC#
Created by Di0n on 5/17/2023 in #help
❔ Fontawesome icons dont support converting in WPF
Hi, im following a youtube tutorial on how to do a calendar UI and in one of the steps im supposed to make the following inside a UserControl
public partial class Items : UserControl
{
public Items()
{
InitializeComponent();
}



public string Title
{
get { return (string)GetValue(TitleProperty); }
set { SetValue(TitleProperty, value); }
}

public static readonly DependencyProperty TitleProperty =
DependencyProperty.Register("Title", typeof(string), typeof(MenuButton));

public string Time
{
get { return (string)GetValue(TimeProperty); }
set { SetValue(TimeProperty, value); }
}

public static readonly DependencyProperty TimeProperty =
DependencyProperty.Register("Time", typeof(string), typeof(MenuButton));


public SolidColorBrush Color
{
get { return (SolidColorBrush)GetValue(ColorProperty); }
set { SetValue(ColorProperty, value); }
}

public static readonly DependencyProperty ColorProperty =
DependencyProperty.Register("Color", typeof(SolidColorBrush), typeof(MenuButton));


public FontAwesome.Sharp.Icon Icon
{
get { return (FontAwesome.Sharp.Icon)GetValue(IconProperty); }
set { SetValue(IconProperty, value); }
}

public static readonly DependencyProperty IconProperty =
DependencyProperty.Register("Icon", typeof(FontAwesome.Sharp.Icon), typeof(MenuButton));

public FontAwesome.Sharp.Icon IconBell1
{
get { return (FontAwesome.Sharp.Icon)GetValue(IconBell1Property); }
set { SetValue(IconBell1Property, value); }
}

public static readonly DependencyProperty IconBell1Property =
DependencyProperty.Register("IconBell1", typeof(FontAwesome.Sharp.Icon), typeof(MenuButton));


}
public partial class Items : UserControl
{
public Items()
{
InitializeComponent();
}



public string Title
{
get { return (string)GetValue(TitleProperty); }
set { SetValue(TitleProperty, value); }
}

public static readonly DependencyProperty TitleProperty =
DependencyProperty.Register("Title", typeof(string), typeof(MenuButton));

public string Time
{
get { return (string)GetValue(TimeProperty); }
set { SetValue(TimeProperty, value); }
}

public static readonly DependencyProperty TimeProperty =
DependencyProperty.Register("Time", typeof(string), typeof(MenuButton));


public SolidColorBrush Color
{
get { return (SolidColorBrush)GetValue(ColorProperty); }
set { SetValue(ColorProperty, value); }
}

public static readonly DependencyProperty ColorProperty =
DependencyProperty.Register("Color", typeof(SolidColorBrush), typeof(MenuButton));


public FontAwesome.Sharp.Icon Icon
{
get { return (FontAwesome.Sharp.Icon)GetValue(IconProperty); }
set { SetValue(IconProperty, value); }
}

public static readonly DependencyProperty IconProperty =
DependencyProperty.Register("Icon", typeof(FontAwesome.Sharp.Icon), typeof(MenuButton));

public FontAwesome.Sharp.Icon IconBell1
{
get { return (FontAwesome.Sharp.Icon)GetValue(IconBell1Property); }
set { SetValue(IconBell1Property, value); }
}

public static readonly DependencyProperty IconBell1Property =
DependencyProperty.Register("IconBell1", typeof(FontAwesome.Sharp.Icon), typeof(MenuButton));


}
So basically after adding this new binding methods on the icons and text im getting errors on the icon converter -> Error XDG0028 The TypeConverter for "Icon" does not support converting from a string
9 replies
CC#
Created by Di0n on 5/14/2023 in #help
✅ Font Awesome in WPF
Hi I added Fontawesome Nugget Package to my WPF project (FontAwesome.Sharp) and when I try to add an Icon like <fa:IconImage Icon="AngleLeft"/> it gives me the following Severity Code Description Project File Line Suppression State Error XDG0003 Could not load file or assembly 'FontAwesome.Sharp, Version=6.3.0.0, Culture=neutral, PublicKeyToken=d16d1e4e568ec10f'. The system cannot find the file specified.
Any Fixes?
20 replies
CC#
Created by Di0n on 4/24/2023 in #help
❔ WPF Image not loading From FontAwesome
Hi, I am following a stylying UI tutorial and in the video it makes me download the nugget FontAwesome Sharp and when the person in the video does "<fa:IconImage Icon="Home" /> it shows a home icon but for me it shows a rectangle with "IconImage". Is this from the nugget or im just missing the file / something else? I also added "xmlns:fa="http://schemas.awesome.incremented/wpf/xaml/fontawesome.sharp" at the top. Sorry if it sounds confusing or newbiew question
2 replies
CC#
Created by Di0n on 4/13/2023 in #help
✅ DialogResult and MessageBox in class (namespace)
Hi, I have a class library and wanted to know if its possible to add a dialog result and message box like the following: DialogResult result = MessageBox.Show($"The maximum hours has been/will be reached for this employee {employee.GetName()}'s contract. Do you want to continue?", "Confirmation", MessageBoxButtons.OKCancel); inside a class library (namespace)
8 replies
CC#
Created by Di0n on 4/12/2023 in #help
ASP.NET Page with child and parent
18 replies