mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Fix DataContext management for FastFlags page
This commit is contained in:
parent
e5d6ac0e0a
commit
2bd20b5880
@ -16,7 +16,7 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Grid.Row="0" Margin="0,0,0,16" Text="Manage your own FastFlags. Press the delete key to delete a selected entry." FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
|
<TextBlock Grid.Row="0" Margin="0,0,0,16" Text="Manage your own FastFlags. Double click the value column to edit." FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
|
||||||
|
|
||||||
<DataGrid Name="DataGrid" Grid.Row="1" Style="{x:Null}" HeadersVisibility="Column" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CellEditEnding="DataGrid_CellEditEnding">
|
<DataGrid Name="DataGrid" Grid.Row="1" Style="{x:Null}" HeadersVisibility="Column" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CellEditEnding="DataGrid_CellEditEnding">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
|
@ -10,14 +10,24 @@ namespace Bloxstrap.UI.Elements.Menu.Pages
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class FastFlagsPage
|
public partial class FastFlagsPage
|
||||||
{
|
{
|
||||||
|
bool _initialLoad = false;
|
||||||
|
|
||||||
public FastFlagsPage()
|
public FastFlagsPage()
|
||||||
{
|
{
|
||||||
|
DataContext = new FastFlagsViewModel();
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Page_Loaded(object sender, RoutedEventArgs e)
|
private void Page_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// refresh datacontext on page load to synchronize with editor page
|
// refresh datacontext on page load to synchronize with editor page
|
||||||
|
|
||||||
|
if (!_initialLoad)
|
||||||
|
{
|
||||||
|
_initialLoad = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DataContext = new FastFlagsViewModel();
|
DataContext = new FastFlagsViewModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user