custom controls bindings fix
MODIFY
HunterPie.UI/GUIControls/Custom Controls/MinimalSlider.xaml
HunterPie.UI/GUIControls/Custom Controls/MinimalSlider.xaml
TextChanged="TextBoxBase_OnTextChanged"
LostFocus="TextBox_OnLostFocus"
/>
- <Slider Value="{Binding Value, ElementName=SliderControl, Mode=TwoWay}"
+ <Slider Value="{Binding Value, ElementName=SliderControl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Maximum="{Binding Path=MaxValue, ElementName=SliderControl, Mode=OneWay}"
Minimum="{Binding Path=MinValue, ElementName=SliderControl, Mode=OneWay}"
TickFrequency="{Binding Path=MinChange, ElementName=SliderControl, Mode=OneWay}"

MODIFY
HunterPie.UI/GUIControls/Custom Controls/TextInput.xaml
HunterPie.UI/GUIControls/Custom Controls/TextInput.xaml
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
x:Name="TextInputCtrl"
mc:Ignorable="d"
- DataContext="{Binding RelativeSource={RelativeSource Self}}"
Height="30" Margin="10,0,10,5">
<DockPanel>
- <TextBlock Text="{Binding Label}" Foreground="WhiteSmoke" DockPanel.Dock="Left" FontFamily="Segoe UI Light" Padding="0,0,10,0"
+ <TextBlock Text="{Binding Label, ElementName=TextInputCtrl}" Foreground="WhiteSmoke" DockPanel.Dock="Left" FontFamily="Segoe UI Light" Padding="0,0,10,0"
VerticalAlignment="Center"/>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" DockPanel.Dock="Right">
- <TextBox x:Name="TextBox" Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
+ <TextBox x:Name="TextBox" Text="{Binding Text, ElementName=TextInputCtrl, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Background="{x:Null}" Foreground="#ffbfbfbf" BorderBrush="#FFABADB3"
IsReadOnly="{Binding IsReadOnly, ElementName=TextInputCtrl}"
BorderThickness="0,0,0,1" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" />
- <TextBox x:Name="WatermarkTextBox" IsHitTestVisible="False" IsReadOnly="True" Foreground="#cc9E9D9D" Text="{Binding Watermark}"
+ <TextBox x:Name="WatermarkTextBox" IsHitTestVisible="False" IsReadOnly="True" Foreground="#cc9E9D9D" Text="{Binding Watermark, ElementName=TextInputCtr}"
Background="{x:Null}"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"

custom controls bindings fix