远程图标功能 完成
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
mc:Ignorable="d"
|
||||
>
|
||||
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||
<ListBox x:Name="IconListBox" ItemsSource="{Binding}" BorderThickness="0" Background="AliceBlue">
|
||||
<ListBox x:Name="IconListBox" ItemsSource="{Binding Iconfonts}" BorderThickness="0" Background="AliceBlue">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal" Background="Transparent"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Tag="{Binding}" Width="80" Height="80">
|
||||
<StackPanel Width="80" Height="80">
|
||||
<Button Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsEnabled="False"
|
||||
|
||||
@@ -23,41 +23,8 @@ namespace GeekDesk.Control.UserControls.IconFont
|
||||
{
|
||||
public IconPannel()
|
||||
{
|
||||
//DataContext = this;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IconfontListProperty = DependencyProperty.Register("IconfontList", typeof(List<IconfontInfo>), typeof(IconPannel));
|
||||
public List<IconfontInfo> IconfontList
|
||||
{
|
||||
get
|
||||
{
|
||||
return (List<IconfontInfo>)GetValue(IconfontListProperty);
|
||||
}
|
||||
set
|
||||
{
|
||||
SetValue(IconfontListProperty, true);
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IconInfoProperty = DependencyProperty.Register("IconInfo", typeof(IconfontInfo), typeof(IconPannel));
|
||||
|
||||
public IconfontInfo IconInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return (IconfontInfo)GetValue(IconInfoProperty);
|
||||
}
|
||||
set
|
||||
{
|
||||
SetValue(IconInfoProperty, true);
|
||||
}
|
||||
}
|
||||
|
||||
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
IconfontInfo info = IconfontList[IconListBox.SelectedIndex];
|
||||
IconInfo = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user