Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi Devexpress !


                                    I want to add buttons above the home tab as shown by this image. How is it possible?

                                    [XAML]
                                    <UserControl x:Class="NRCSA.nrcsaEntitiesView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking" xmlns:dxn="http://schemas.devexpress.com/winfx/2008/xaml/navbar" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" xmlns:local="clr-namespace:NRCSA" mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="800"> <UserControl.DataContext> <local:nrcsaEntitiesViewModel /> </UserControl.DataContext> <dxmvvm:Interaction.Triggers> <dxmvvm:EventToCommand Command="{Binding ShowDocumentCommand}" CommandParameter="EmployeeCollectionView;Employees" /> </dxmvvm:Interaction.Triggers> <dxmvvm:Interaction.Behaviors> <dx:DXMessageBoxService/> </dxmvvm:Interaction.Behaviors> <Grid> <dxb:BarManager> <dxb:BarManager.Items> <dxb:BarButtonItem x:Name="barButtonItem1" Content="About" Glyph="pack://application:,,,/DevExpress.Images.v13.1;component/Images/Support/Info_16x16.png" LargeGlyph="pack://application:,,,/DevExpress.Images.v13.1;component/Images/Support/Info_32x32.png" Command="{Binding ShowAboutCommand}"/> <dxb:BarButtonItem x:Name="barButtonItem2" Content="New" /> <dxb:BarButtonItem x:Name="SaveCommandBarButtonItem" Content="Save" /> <dxb:BarButtonItem x:Name="DeleteCommandBarButtonItem" Content="Delete" Command="{Binding DeleteCommand}" /> <dxb:BarButtonItem x:Name="CloseCommandBarButtonItem" Content="Close" Command="{Binding CloseCommand}" /> </dxb:BarManager.Items> <DockPanel> <dxr:RibbonControl DockPanel.Dock="Top" RibbonStyle="Office2010" ToolbarShowMode="ShowAbove"> <dxr:RibbonControl.PageHeaderItemLinks> <dxb:BarButtonItemLink BarItemName="barButtonItem1"/> <dxb:BarButtonItemLink BarItemName="item1"/> <dxb:BarButtonItemLink BarItemName="barButtonItem2"/> <dxb:BarButtonItemLink BarItemName="SaveCommandBarButtonItem"/> </dxr:RibbonControl.PageHeaderItemLinks> <dxr:RibbonDefaultPageCategory Caption="defaultCategory"> <dxr:RibbonPage Caption="Home"> <dxr:RibbonPageGroup Caption="Tools"/> </dxr:RibbonPage> <dxr:RibbonPage Caption="NewPage"> <dxr:RibbonPageGroup Caption="Tools"> <dxr:RibbonPageGroup.ItemLinks> <dxb:BarButtonItemLink BarItemName="item1"/> </dxr:RibbonPageGroup.ItemLinks> </dxr:RibbonPageGroup> </dxr:RibbonPage> </dxr:RibbonDefaultPageCategory> </dxr:RibbonControl> <dxr:RibbonStatusBarControl DockPanel.Dock="Bottom" /> <Grid Background="Transparent"> <dxdo:DockLayoutManager> <dxdo:LayoutGroup Caption="LayoutRoot"> <dxdo:LayoutPanel ItemWidth="0.4*" MaxWidth="250" Caption="Navigation"> <dxn:NavBarControl AllowSelectItem="False"> <dxn:NavBarControl.View> <dxn:NavigationPaneView IsExpandButtonVisible="False" /> </dxn:NavBarControl.View> <dxn:NavBarControl.Groups> <dxn:NavBarGroup Header="Tables" ImageSource="C:\\Users\\must\\Documents\Visual Studio 2012\\Projects\\NRCSA\\Table.ico"> <dxn:NavBarItem Content="Names" Command="{Binding ShowDocumentCommand}" CommandParameter="NamesCollectionView;Names" /> <dxn:NavBarItem Content="Employees" Command="{Binding ShowDocumentCommand}" CommandParameter="EmployeeCollectionView;Employees" /> </dxn:NavBarGroup> <dxn:NavBarGroup x:Name="navBarGroup6" Header="System Controls" ImageSource="C:\\Users\\must\\Documents\Visual Studio 2012\\Projects\\NRCSA\\SystemControl.ico"> <dxn:NavBarItem x:Name="navBarItem6" Content="Invoices statistics" Command="{Binding ShowDocumentCommand}" CommandParameter="InvoicesStatisticsView;InvoicesStatistics"/> </dxn:NavBarGroup> <dxn:NavBarGroup x:Name="navBarGroup5" Header="Assignments" ImageSource="C:\\Users\\must\\Documents\Visual Studio 2012\\Projects\\NRCSA\\Assignment.ico"> <dxn:NavBarItem x:Name="navBarItem5" Content="Invoices statistics" Command="{Binding ShowDocumentCommand}" CommandParameter="InvoicesStatisticsView;InvoicesStatistics"/> </dxn:NavBarGroup> <dxn:NavBarGroup x:Name="navBarGroup1" Header="Rundown" ImageSource="C:\\Users\\must\\Documents\Visual Studio 2012\\Projects\\NRCSA\\Rundown1.ico"> <dxn:NavBarItem x:Name="navBarItem1" Content="Invoices statistics" Command="{Binding ShowDocumentCommand}" CommandParameter="InvoicesStatisticsView;InvoicesStatistics"/> </dxn:NavBarGroup> <dxn:NavBarGroup x:Name="navBarGroup2" Header="Wires" ImageSource="C:\\Users\\must\\Documents\Visual Studio 2012\\Projects\\NRCSA\\RSS.ico"> <dxn:NavBarItem x:Name="navBarItem2" Content="Invoices statistics" Command="{Binding ShowDocumentCommand}" CommandParameter="InvoicesStatisticsView;InvoicesStatistics"/> </dxn:NavBarGroup> <dxn:NavBarGroup x:Name="navBarGroup3" Header="Shows" ImageSource="C:\\Users\\must\\Documents\Visual Studio 2012\\Projects\\NRCSA\\Show1.ico"> <dxn:NavBarItem x:Name="navBarItem3" Content="Invoices statistics" Command="{Binding ShowDocumentCommand}" CommandParameter="InvoicesStatisticsView;InvoicesStatistics"/> </dxn:NavBarGroup> <dxn:NavBarGroup x:Name="navBarGroup4" Header="Mywork Space" ImageSource="C:\\Users\\must\\Documents\Visual Studio 2012\\Projects\\NRCSA\\WorkSpace1.ico"> <dxn:NavBarItem x:Name="navBarItem4" Content="Invoices statistics" Command="{Binding ShowDocumentCommand}" CommandParameter="InvoicesStatisticsView;InvoicesStatistics"/> </dxn:NavBarGroup> </dxn:NavBarControl.Groups> </dxn:NavBarControl> </dxdo:LayoutPanel> <dxdo:DocumentGroup x:Name="documentGroup"> <dxmvvm:Interaction.Behaviors> <dxdo:TabbedDocumentUIService /> </dxmvvm:Interaction.Behaviors> </dxdo:DocumentGroup> </dxdo:LayoutGroup> </dxdo:DockLayoutManager> </Grid> </DockPanel> </dxb:BarManager> </Grid> </UserControl>

                                • hina tahir 07.16.2013

                                  Devexpresssssssss ?? :(

                                You must  log in  or  register  to leave comments

                                1 Solution

                                1

                                Hello,

                                To achieve you goal you can override the x:Key="{dxrt:RibbonThemeKey ResourceKey=ControlTemplate}" template. I have created a sample project to demonstrate this approach in action. Please take a moment to review it and let me know whether or not this solution meets your requirements.

                                Thanks,
                                Michael

                                Show all comments
                                • hina tahir 07.16.2013

                                  Excellent Michael. Thank you sooooo much :) :)

                                • You're welcome, Hina! Feel free to contact us if you need any additional assistance. We will be happy to help you.

                                • hina tahir 07.16.2013

                                  Hi Michael ! Code provided by you is showing buttons in Design tab but as i ran program it didn't show there. Here is attached image

                                • hina tahir 07.16.2013

                                  Here Code is

                                • hina tahir 07.16.2013

                                  Full Project

                                • hina tahir 07.16.2013

                                  And Michael, as i made changes and executed it for two three times, it generated Warning, i pasted all its details in this ticket :http://www.devexpress.com/Support/Center/Question/Details/Q510236

                                  Need your Guidance. Thank you

                                • hina tahir 07.16.2013

                                  Michael ! Please Answer my both question thank you for help:)

                                • hina tahir 07.16.2013

                                  And Michael can i add a label and a textbox instead of this Button ?? :) :) ---- Sorry that i asked soooo many Questions

                                • Alexander Rus (DevExpress Support) 07.16.2013

                                  Hi Hina,
                                  The buttons don't appear at runtime since you are applying a theme. When you use a theme, it is necessary to set either the IsThemeIndependent attribute to "True" or ThemeName to "MetropolisLight":

                                  [XAML]
                                  <ControlTemplate x:Key="{dxrt:RibbonThemeKey ResourceKey=ControlTemplate, IsThemeIndependent=True}" TargetType="{x:Type dxr:RibbonControl}"> ...
                                  or
                                  [XAML]
                                  <ControlTemplate x:Key="{dxrt:RibbonThemeKey ResourceKey=ControlTemplate, ThemeName=MetropolisLight}" TargetType="{x:Type dxr:RibbonControl}"> ...
                                  To add a TextBox or a Label instead of buttons, change the following code in the template:
                                  [XAML]
                                  <dxc:BackgroundPanel Grid.Row="1" Grid.Column="1"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> <Button Content="Test" Margin="2" Width="50"/> <TextBox Margin="2" Width="50"/> <Label Content="Test" Margin="2" Width="50"/> </StackPanel> </dxc:BackgroundPanel>
                                  As for the warnings, we will answer this question in the Q510236 thread.

                                  Thanks,
                                  Alexander Rus

                                • hina tahir 07.17.2013

                                  Super! Thank you so much Alexander Rus! Devexpress Support team members are awesome :)

                                • Alexander Rus (DevExpress Support) 07.17.2013

                                  You are welcome, Hina :) I am glad to hear that our assistance was helpful to you!

                                • hina tahir 07.17.2013

                                  Alexander i am here again to disturb you :) :D ..... Another Question -- Can you Please Tell me that how can i add these labels(Work and NewData) below "Test" Label ? And secondly why these white spaces at both sides are appearing :) Thank you :)

                                • hina tahir 07.17.2013

                                  Last Query Please --- Is it possible to hide this panel containing labels except Test Label? ... Please guide me as i need it :)

                                • Alexander Rus (DevExpress Support) 07.17.2013

                                  Hi Hina,
                                  The white space appeared because the panel with the TextBoxes shared the space with other elements in the row. I have updated Michael's sample to demonstrate how to avoid that.
                                  To provide the capability to hide the labels, you can add them to the Expander. You can also check this approach in the attached project.

                                  Thanks,
                                  Alexander Rus

                                • hina tahir 07.18.2013

                                  Thank's a lot :) ---- Alexander Rus ------ :) :)

                                • Alexander Rus (DevExpress Support) 07.18.2013

                                  You are welcome!

                                • hina tahir 07.18.2013

                                  Hi Alexander Rus! i hope you are doing good. Alexander as there is a less Space between Test Label and Title of a window "MainWindow", both are so close, How can i add a row between both( Before Test Label)? Should i write this:

                                   <Grid Grid.Row="0">

                                                                  <Grid x:Name="PART_HeaderAndTabsLayout">
                                                                      <Grid.RowDefinitions>
                                                                   <RowDefinition Height="Auto"/> <!--Here i added a row.-->
                                                                          <RowDefinition Height="{Binding IsRibbonTitleBarActualVisible, Converter={StaticResource headerVisibilityToDoubleConverter}, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"/>
                                                                          <RowDefinition Height="Auto"/>
                                                                          <RowDefinition Height="*"/>
                                                                          
                                                                      </Grid.RowDefinitions>
                                                                      <Grid.ColumnDefinitions>
                                                                          <ColumnDefinition Width="Auto"/>

                                                                          <ColumnDefinition Width="*"/>
                                                                          <ColumnDefinition Width="Auto"/>
                                                                      </Grid.ColumnDefinitions>
                                                                      <dx:BackgroundPanel Grid.Row="1" Grid.ColumnSpan="3">
                                                                          <StackPanel Orientation="Vertical" >
                                                                              <Grid>
                                                                                  <Grid.ColumnDefinitions>
                                                                                      <ColumnDefinition/>
                                                                                      <ColumnDefinition/>
                                                                                      <ColumnDefinition/>
                                                                                  </Grid.ColumnDefinitions>
                                                                                  <TextBlock Text=" RSS/Wires " HorizontalAlignment="Right" Width="64" Margin="0,0,95,0"/>
                                                                                  <ComboBox x:Name="rsscombobox" Grid.Column="0" Width="333" HorizontalAlignment="Left" Grid.ColumnSpan="3" Margin="217,0,0,0"/>

                                                                                  <TextBlock HorizontalAlignment="Right" Width="123" Grid.Column="2" Grid.ColumnSpan="3" Margin="0,3,42,3" Background="#FBB117" VerticalAlignment="Center" Text="{Binding Source={x:Static sys:DateTime.Today}, StringFormat='{}{0:dddd, MMMM dd, yyyy}'}" Foreground="Black" />
                                                                              </Grid>
                                                                              <Expander>
                                                                                  <Grid>
                                                                                      <Grid.RowDefinitions>
                                                                                          <RowDefinition/>
                                                                                          <RowDefinition/>
                                                                                          <RowDefinition/>
                                                                                      </Grid.RowDefinitions>
                                                                                      <Grid.ColumnDefinitions>
                                                                                          <ColumnDefinition/>
                                                                                          <ColumnDefinition/>
                                                                                          <ColumnDefinition/>
                                                                                      </Grid.ColumnDefinitions>
                                                                                      <TextBlock Text="Alert" HorizontalAlignment="Right" Width="64"/>
                                                                                      <TextBox Grid.Column="1" Width="334" HorizontalAlignment="Left" Grid.ColumnSpan="2"/>
                                                                                      <TextBlock Text="Messages" Grid.Row="1" HorizontalAlignment="Right" Width="64"/>
                                                                                      <TextBox Grid.Row="1" Grid.Column="1" Width="334" HorizontalAlignment="Left" Grid.ColumnSpan="2"/>
                                                                                      <TextBlock Text="Tickers " Grid.Row="2" HorizontalAlignment="Right" Width="64"/>
                                                                                      <ComboBox x:Name="tickercombobox" Grid.Row="2" Grid.Column="1" Width="334" HorizontalAlignment="Left" Grid.ColumnSpan="2"/>
                                                                                  </Grid>
                                                                              </Expander>
                                                                          </StackPanel>
                                                                      </dx:BackgroundPanel>

                                • Alexander Rus (DevExpress Support) 07.19.2013

                                  Hi Hina,
                                  To add an indent between the title and the "Test" TextBlock, I suggest you set the top Margin for the StackPanel in the following manner:

                                  [XAML]
                                  <dxc:BackgroundPanel Grid.Row="1" Grid.ColumnSpan="3"> <StackPanel Orientation="Vertical" Margin="0,10,0,0"> ...

                                  Thanks,
                                  Alexander Rus

                                • hina tahir 07.19.2013

                                  i mean how can i use these labels in xaml.cs class

                                • Alexander Rus (DevExpress Support) 07.21.2013

                                  Hi Hina,
                                  To use these elements, first it is necessary to find them in the visual tree. To accomplish this task, I suggest that you use the LayoutHelper.FindElementByName method:

                                  [C#]
                                  TextBox TestTextBox = LayoutHelper.FindElementByName(ribbonControl1, "Test_TextBox") as TextBox; if (TestTextBox != null) { TestTextBox.Text += "Hi!"; }
                                  Then you can use the found element as usual.
                                  I have updated the project to demonstrate this approach in action.

                                  Thanks,
                                  Alexander Rus

                                • hina tahir 07.22.2013

                                  Hi Alexander Rus--- Thank you sooo much... but i have another question :) ... can you please tell me that why this error is occurring?

                                  here is Xaml Code. What i did here is that i created a Grid and initialized a text-box "time7segement", i want to show time in it.
                                    <dx:BackgroundPanel Grid.Row="1" Grid.ColumnSpan="3">
                                                                          <StackPanel Orientation="Vertical" Margin="0,-20,0,0">
                                                                              <Grid>
                                                                                  <Grid.ColumnDefinitions>
                                                                                      <ColumnDefinition/>
                                                                                      <ColumnDefinition/>
                                                                                  </Grid.ColumnDefinitions>
                                                                                   <TextBlock x:Name="abc" HorizontalAlignment="Right" Width="150" Grid.Column="1" Grid.ColumnSpan="1" Margin="0,88,10,-41" VerticalAlignment="Stretch" Text="{Binding Source={x:Static sys:DateTime.Today}, StringFormat=\{0:dddd\, MMMM dd\, yyyy\}}" Height="Auto" TextOptions.TextFormattingMode="Display" FontSize="14" TextDecorations="{x:Null}" />
                                                                                  
                                                                                  <dxga:DigitalGaugeControl x:Name="time7Segment" Text="12:00:00" SymbolCount="8"
                                                                            Grid.Column="1" FlowDirection="LeftToRight"
                                                                           Margin="0,22,10,-19" HorizontalAlignment="Right" Width="163" VerticalAlignment="Stretch" TextDirection="RightToLeft">
                                                                                      <dxga:DigitalGaugeControl.Layers>
                                                                                          <dxga:DigitalGaugeLayer/>
                                                                                      </dxga:DigitalGaugeControl.Layers>
                                                                                      <dxga:DigitalGaugeControl.Model>
                                                                                          <dxga:DigitalProgressiveModel/>
                                                                                      </dxga:DigitalGaugeControl.Model>
                                                                                      <dxga:DigitalGaugeControl.SymbolView>
                                                                                          <dxga:SevenSegmentsView>
                                                                                              <dxga:SevenSegmentsView.Animation>
                                                                                                  <dxga:BlinkingAnimation RefreshTime="00:000:00.5" SymbolsStates="0 0 1 0 0 1 0 0"/>
                                                                                              </dxga:SevenSegmentsView.Animation>
                                                                                          </dxga:SevenSegmentsView>
                                                                                      </dxga:DigitalGaugeControl.SymbolView>
                                                                                  </dxga:DigitalGaugeControl>
                                                                              </Grid>
                                                                              <Grid>
                                                                                  <Grid.ColumnDefinitions>
                                                                                      <ColumnDefinition Width="267*"/>
                                                                                      <ColumnDefinition Width="266*"/>
                                                                                      <ColumnDefinition Width="267*"/>
                                                                                  </Grid.ColumnDefinitions>
                                                                                 <!-- <TextBlock Text=" RSS/Wires" HorizontalAlignment="Right" Width="64" Margin="0,0,10,0"/>
                                                                                  <ComboBox x:Name="rsscombobox" Binding.XmlNamespaceManager="{Binding ShowDocumentCommand}" Grid.Column="1" Width="387" HorizontalAlignment="Left" Grid.ColumnSpan="2" Margin="0"/>-->
                                                                                  <TextBlock Text="Test" HorizontalAlignment="Right"/>
                                                                                  <TextBox Grid.Column="1" Width="150" HorizontalAlignment="Left" Name="Test_TextBox"/>

                                                                              </Grid>
                                                                              <Expander>
                                                                                  <Grid>
                                                                                      <Grid.RowDefinitions>
                                                                                          <RowDefinition/>
                                                                                          <RowDefinition/>
                                                                                          <RowDefinition/>
                                                                                      </Grid.RowDefinitions>
                                                                                      <Grid.ColumnDefinitions>
                                                                                          <ColumnDefinition/>
                                                                                          <ColumnDefinition/>
                                                                                          <ColumnDefinition/>
                                                                                      </Grid.ColumnDefinitions>
                                                                                      <TextBlock Text="Alert" HorizontalAlignment="Right" Width="64"/>
                                                                                      <TextBox Grid.Column="1" Width="387" HorizontalAlignment="Left" Grid.ColumnSpan="2" Text="{Binding Path=Name2}" AcceptsReturn="True" IsReadOnly="True"/>
                                                                                      <TextBlock Text="Messages" Grid.Row="1" HorizontalAlignment="Right" Width="64"/>
                                                                                      <TextBox Grid.Row="1" Grid.Column="1" Width="387" HorizontalAlignment="Left" Grid.ColumnSpan="2"/>
                                                                                      <TextBlock Text="Tickers " Grid.Row="2" HorizontalAlignment="Right" Width="64"/>
                                                                                      <ComboBox x:Name="tickercombobox" Grid.Row="2" Grid.Column="1" Width="387" HorizontalAlignment="Left" Grid.ColumnSpan="2"/>
                                                                                  </Grid>
                                                                              </Expander>
                                                                          </StackPanel>
                                                                      </dx:BackgroundPanel>

                                  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                                  i Initialized it in .cs file but it is generating error that this text-box doesn't exist in context. How can i initialize it in tree?
                                     public nrcsaEntitiesView()
                                      {
                                            InitializeComponent();
                                             UpdateTime();
                                              timer.Tick += new EventHandler(OnTimedEvent);
                                              timer.Interval = new TimeSpan(0, 0, 1);
                                              timer.Start();
                                     }
                                        void OnTimedEvent(object source, EventArgs e) {
                                              UpdateTime();
                                          }
                                          void UpdateTime() {
                                          DigitalGaugeControl TestTextBox1 = LayoutHelper.FindElementByName(ribbonControl1, "time7Segment") as DigitalGaugeControl;
                                                if (TestTextBox1 != null)
                                                    {
                                                    time7Segment.Text = string.Format("{0:H:mm:ss}", DateTime.Now);
                                                    }
                                     }

                                • hina tahir 07.22.2013

                                  Secondly... if i want to show five records in combobox. then how can i add this combobox to Tree to use it in xaml.cs file to bind with records?

                                • Alexander Rus (DevExpress Support) 07.22.2013

                                  Since you assigned the found DigitalGaugeControl control to the TestTextBox1 variable, use "TestTextBox1" instead of "time7Segment":

                                  [C#]
                                  TestTextBox1.Text = string.Format("{0:H:mm:ss}", DateTime.Now);
                                  As for the ComboBox, I suggest that you subscribe to the ComboBox.Loaded event and assign the ItemsSource in this event handler:.
                                  [XAML]
                                  <ComboBox Grid.Column="1" Width="150" HorizontalAlignment="Left" Loaded="ComboBox_Loaded"/>

                                  [C#]
                                  private void ComboBox_Loaded(object sender, RoutedEventArgs e) { ComboBox combo = sender as ComboBox; ObservableCollection<string> items = new ObservableCollection<string>(); items.Add("one"); items.Add("two"); items.Add("three"); combo.ItemsSource = items; }

                                  Thanks,
                                  Alexander Rus

                                • hina tahir 07.22.2013

                                  Thank you Alexander Rus --- but still time DigitalGaugeControl is not working.
                                  Hina

                                • hina tahir 07.22.2013

                                  Attached image/

                                • hina tahir 07.22.2013

                                  I think problem is with constructor of a xaml.cs file because as i added updatetime() function it showed time for once.

                                • hina tahir 07.22.2013

                                  SO NOW HOW CAN I RESOLVE THIS ISSUE :(

                                • hina tahir 07.22.2013

                                  Or am i missing them in ribboncontrol1

                                • Alexander Rus (DevExpress Support) 07.22.2013

                                  Hi Hina,
                                  An instance of the timer should be stored out of the constructor. Otherwise the timer will be destroyed by the garbage collector. I have modified the project to demonstrate how to accomplish this task.
                                  I also ask you not to post several issues in one thread since it is difficult to process such inquires for different support engineers.

                                  Thanks,
                                  Alexander Rus

                                • hina tahir 07.23.2013

                                  Alexander Rus! Thank you so much for your precious time. and i am really sorry that i am disturbing you and asking queries again and again. I thought that all queries are related to one same interface that's why i posted all queries here in same ticket. I will remember it next time. Thank you for informing me again :) :) ... Dear Alexander digital gauge is still not picking up Here code is:
                                       DispatcherTimer timer = new DispatcherTimer();
                                          DispatcherTimer tm;
                                          int t = 0;
                                          public nrcsaEntitiesView()
                                              {
                                              InitializeComponent();
                                              tm = new DispatcherTimer();
                                              tm.Tick += tm_Tick;
                                              tm.Interval = new TimeSpan(0, 0, 1);
                                            }
                                          void tm_Tick(object sender, EventArgs e)
                                              {
                                              t++;
                                              TestTextBox1.Text = t.ToString();
                                              }
                                          DigitalGaugeControl TestTextBox1;
                                          private void Button_Click(object sender, RoutedEventArgs e)
                                              {
                                              TestTextBox1 = LayoutHelper.FindElementByName(ribbonControl1, "Test_TextBox") as DigitalGaugeControl;
                                              tm.Start();
                                            
                                              }

                                • hina tahir 07.23.2013

                                  Here Solution is:
                                   public partial class MainWindow : Window
                                      {
                                          DispatcherTimer tm;
                                          int t = 0;
                                          public MainWindow()
                                          {
                                              InitializeComponent();
                                              tm = new DispatcherTimer();
                                              tm.Tick += tm_Tick;
                                              tm.Interval = new TimeSpan(0, 0, 1);
                                          }

                                          void tm_Tick(object sender, EventArgs e)
                                          {
                                              t++;
                                              TestTextBox.Text = string.Format("{0:H:mm:ss}", DateTime.Now);
                                          }
                                          DigitalGaugeControl TestTextBox;
                                          private void Button_Click(object sender, RoutedEventArgs e)
                                          {
                                          TestTextBox = LayoutHelper.FindElementByName(ribbonControl1, "Test_TextBox") as DigitalGaugeControl;
                                              tm.Start();
                                          TestTextBox.Text = string.Format("{0:H:mm:ss}", DateTime.Now);
                                          }

                                • hina tahir 07.23.2013

                                  Thank You Alexander :)

                                • Alexander Rus (DevExpress Support) 07.23.2013

                                  Thank you for sharing your solution with us. I am glad to hear that you have managed to resolve this issue!

                                You must  log in  or  register  to leave comments

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners