or
grd.MaxHeight = double.PositiveInfinity;grd.ScrollIntoView(objSel);grdMain.ScrollIntoView(objSel);grd.BringIntoView();<telerik:RadTransitionControl Duration="0:0:1" Content="{TemplateBinding CurrentThreshold}"> <telerik:RadTransitionControl.Transition> <telerik:FadeTransition /> </telerik:RadTransitionControl.Transition> <telerik:RadTransitionControl.ContentTemplate> <DataTemplate DataType="{x:Type local:ServiceLevelThreshold}"> <Grid> <Rectangle Opacity=".75" Fill="{Binding Background}" /> <TextBlock Margin="4" Foreground="{Binding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{StaticResource ServiceLevelBlockContentTextBlock}" Text="{Binding Value, RelativeSource={RelativeSource AncestorType={x:Type local:ServiceLevelBlock}}}" FontSize="30" /> </Grid> </DataTemplate> </telerik:RadTransitionControl.ContentTemplate></telerik:RadTransitionControl><Window x:Class="WpfApplication20.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <telerik:FadeTransition x:Key="fadeTransition" /> </Window.Resources> <Grid> <Viewbox> <telerik:RadTransitionControl x:Name="tran" Transition="{StaticResource fadeTransition}" Content="{Binding Text}"> <telerik:RadTransitionControl.ContentTemplate> <DataTemplate> <TextBlock Text="{Binding}"></TextBlock> </DataTemplate> </telerik:RadTransitionControl.ContentTemplate> </telerik:RadTransitionControl> </Viewbox> </Grid></Window>
public partial class MainWindow : Window , INotifyPropertyChanged
{
DispatcherTimer _timer = null;
public MainWindow()
{
InitializeComponent();
_timer = new DispatcherTimer();
_timer.Interval = TimeSpan.FromSeconds(1);
_timer.Tick += _timer_Tick;
this.DataContext = this;
_timer.Start();
}
int count = 0;
private string _text = "0";
public string Text
{
get
{
return _text;
}
set
{
if (_text != value)
{
_text = value;
this.NotifyOfPropertyChange("Text");
}
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyOfPropertyChange(string prop)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(prop));
}
}
#endregion
void _timer_Tick(object sender, EventArgs e)
{
count++;
Text = count.ToString();
}
}
RadWindow.Confirm(new DialogParameters(){ Owner = myMainpage, DialogStartupLocation = WindowStartupLocation.CenterOwner, Content = message, Closed = Cancel_Click private void Cancel_Click(object sender, Telerik.Windows.Controls.WindowClosedEventArgs e) {
Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, (System.Threading.ThreadStart)delegate()
{
myTextBox.Focus();
});
//set the focus here