将自定义控件单开一个项目
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<UserControl x:Class="Ink_Canvas.Controls.LabeledToggleSwitch"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf">
|
||||
<ikw:SimpleStackPanel Spacing="4">
|
||||
<ikw:SimpleStackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Text="{Binding Label, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#fafafa"
|
||||
FontSize="14"
|
||||
Margin="0,0,16,0"/>
|
||||
<ui:ToggleSwitch x:Name="ToggleSwitch"
|
||||
OnContent="{Binding OnContent, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
OffContent="{Binding OffContent, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
IsOn="{Binding IsOn, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay}"
|
||||
FontWeight="Bold"
|
||||
Toggled="ToggleSwitch_Toggled"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
<TextBlock x:Name="HintTextBlock"
|
||||
Text="{Binding Hint, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
TextWrapping="Wrap"
|
||||
Foreground="#a1a1aa"
|
||||
Visibility="Collapsed"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user