Hello,
I am trying to replicate the XamTrader to a certain extent, but not in entirety. I am especially curious about the XamDataGrid to the left of the page. How is the data put up there manually and also how do I bind it to a SQL Stored Procedure. Also, there is a link "Add", I was wondering how to add a link in a XamDataGrid?
Any help on this is greatly appreciated as I have just started using WPF and never worked on it before!
Thanks
The Add button in the sample is actually a styled button. You can see the example below:
<Style x:Key="btnStyle" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Grid> <TextBlock FontFamily="Segoe UI" FontSize="10" FontWeight="Normal" Foreground="#FF000000" Text="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="textBlock"/> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsFocused" Value="True"/> <Trigger Property="IsDefaulted" Value="True"/> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="TextDecorations" TargetName="textBlock" Value="Underline"/> </Trigger> <Trigger Property="IsPressed" Value="True"/> <Trigger Property="IsEnabled" Value="False"/> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Cursor" Value="Hand"/> </Style>
Hello there,
Thanks for your reply!
I will note that down, but my other question remains unanswered. How do I bind a XamDataGrid to a SQL stored procedure? and also binding to data manually. i.e. static data
You can use the stored procedure to fill a DataSet. Here is an example of binding the DataSet to the xamDataGrid.