Greetings,
I'm evaluating WPF Studio and just learning my way around these controls (and WPF in general), so I apologize if this is an elementary question...
In a Wizard I've created I have a page that contains a "Start Over" button in the "content" part of the page. The button appears on only the one page and its Visibility is also tied to a property with a DataTrigger. Here's what I'm doing now:
<Button Name="startOverButton" Margin="10,10,2,10" Padding="3"
Content="Start Over"
Command="wizard:WizardCommands.BacktrackToPage"
CommandParameter="searchPage">
<Button.Style>
<Style BasedOn="{StaticResource {x:Type Button}}"
TargetType="{x:Type Button}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=ApproveByBatch}" Value="true">
<Setter Property="Control.Visibility" Value="Visible"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=ApproveByBatch}" Value="false">
<Setter Property="Control.Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
Functionally, this works fine. However, the button really belongs in the Wizard's Button Container with the other navigation buttons. What's the best way to approach doing that, especially given the requirements I outlined above? The sample app shows how to rearrange the container, but not how to add something to it.
Any tidbits of wisdom you can send my way would be greatly appreciated!
Thanks!
Bob
I'm evaluating WPF Studio and just learning my way around these controls (and WPF in general), so I apologize if this is an elementary question...
In a Wizard I've created I have a page that contains a "Start Over" button in the "content" part of the page. The button appears on only the one page and its Visibility is also tied to a property with a DataTrigger. Here's what I'm doing now:
<Button Name="startOverButton" Margin="10,10,2,10" Padding="3"
Content="Start Over"
Command="wizard:WizardCommands.BacktrackToPage"
CommandParameter="searchPage">
<Button.Style>
<Style BasedOn="{StaticResource {x:Type Button}}"
TargetType="{x:Type Button}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=ApproveByBatch}" Value="true">
<Setter Property="Control.Visibility" Value="Visible"/>
</DataTrigger>
<DataTrigger Binding="{Binding Path=ApproveByBatch}" Value="false">
<Setter Property="Control.Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
Functionally, this works fine. However, the button really belongs in the Wizard's Button Container with the other navigation buttons. What's the best way to approach doing that, especially given the requirements I outlined above? The sample app shows how to rearrange the container, but not how to add something to it.
Any tidbits of wisdom you can send my way would be greatly appreciated!
Thanks!
Bob