Could you tell me how to implement xamGauge as a UserControl that can be load to a second SplitPane?
The example in the online documentation does not work for my case.
Hello,
Thank you for your post. I have created a sample application for you that demonstrates how you can create a UserControl with a XamRadialGauge in it and use it in a SplitPane of a XamDockManaged.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you very much.
A novice in your wonderful world of Infragistics.
I am very glad that my reply was helpful for you. Please let me know if you need any further assistance on the matter.
I was able to put a textblock in a gauge (to indicate what gauge it is like Temperature 1, Pressure 3...).
I am currently working on XamTileManager. I have a question:
I have a TileManager with 5 tiles and would like to display them equally stretched in the tilemanager.
How would I do it?
Thank you for your replay. I have been looking into your question and I can suggest using the NormalModeSettings of the XamTileManager in order to implement the appearance that you have described. To do that you can set the AllowTileSizing property of the NormalModeSettings to Synchronized in order to resize all tiles proportionally. Also you can set the TileConstraints property of the NormalModeSettings in order to set minimum width and height for example. I have created a sample application for you that demonstrates the described approach. You can read more details on NormalModeSettings here in our documentation: http://help.infragistics.com/NetAdvantage/WPF/2012.1/CLR4.0/?page=xamTileManager_Modify_Tile_Behaviors_in_Normal_Mode.html
I am just checking if you require any further assistance on the matter.
Krasimir,
Thank you for your support. I was so busy with other component and did not check the forum lately.
Khanh
Hello Khanh,
Thank you for your reply. I have been looking into your requirement and I can suggest using UnboundColumns and when creating GroupColumns that contain columns that should display the same data. I have created a sample application for you that demonstrates how you can implement this approach using only C# code. Here is an example of the code that can implement this functionality:
Xaml:
<Window x:Class="GroupColumnsDynamicallyCreated.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ig="http://schemas.infragistics.com/xaml" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <DataTemplate x:Key="MinTemplate"> <Grid> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding RowData.Min}"/> </Grid> </DataTemplate> <DataTemplate x:Key="AvgTemplate"> <Grid> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding RowData.Avg}"/> </Grid> </DataTemplate> <DataTemplate x:Key="MaxTemplate"> <Grid> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding RowData.Max}"/> </Grid> </DataTemplate> </Window.Resources> <Grid> <ig:XamGrid x:Name="xamGrid1" ItemsSource="{Binding}" AutoGenerateColumns="False"/> <Button Content="Add Group" Height="23" HorizontalAlignment="Right" Margin="0,0,12,12" Name="button1" VerticalAlignment="Bottom" Width="75" Click="button1_Click" /> </Grid> </Window>
C#
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); DataContext = new List<Data> { new Data { Min = 0, Max = 10 }, new Data { Min = 2, Max = 4 }, new Data { Min = 4, Max = 15 }, new Data { Min = 4, Max = 15 }, new Data { Min = 1, Max = 3 }, }; } int i = 0; private void button1_Click(object sender, RoutedEventArgs e) { i++; GroupColumn group = new GroupColumn { HeaderText = "Group " + i, Key = "group" + i }; //UnboundColumnDataContext asd;asd.RowData UnboundColumn min = new UnboundColumn { Key = "min" + i, HeaderText = "Min", ItemTemplate = Resources["MinTemplate"] as DataTemplate }; UnboundColumn avg = new UnboundColumn { Key = "avg" + i, HeaderText = "Avg", ItemTemplate = Resources["AvgTemplate"] as DataTemplate }; UnboundColumn max = new UnboundColumn { Key = "max" + i, HeaderText = "Max", ItemTemplate = Resources["MaxTemplate"] as DataTemplate }; group.Columns.Add(min); group.Columns.Add(avg); group.Columns.Add(max); xamGrid1.Columns.Add(group); } } public class Data { public int Min { get; set; } public double Avg { get { return (Max - Min) / 2; } } public int Max { get; set; } }
Hi Krasimir,
It's good to hear from you.
I'm having an urgent issue that is about dynamic XamGrid.
I see in the Infragistics example of XamGrid. It looks great but I don't know how to do it in C# codebehind.
That is, I would like to create C# codehind dynamic XamGrid that has group columns. Each group column has three fields. When I click a button, another group column will sit beside the first one and have a different HeaderText but the same three fields and their column header names too.
i.e.:
The first xamGrid's GroupColumn is this:
Temp (Group header)
Min | Avg | Max --> three fields
Then when I click a button, another group column will appear beside the first one, like this:
Temp1 (Group header, different HeaderText)
Min | Avg | Max --> the same as above
and so on and on.
Could you help me this issue with C# code only?
Best Regards and Thank you,
Thank you for the provided feedback. Please let me know if you need any further assistance on the matter.