Telerik Forums
UI for WPF Forum
1 answer
384 views
I have a grid with 2 subgrids. This hierachy is defined in the xaml with the ChildTableDefinitions property. The child grids have
grd.MaxHeight = double.PositiveInfinity;
in order to avoid a clutter of scrollbars. Also row virtualization has been turned off for as well the main grid as the child grids.

Now I'm implementing a refresh operation. During this, I want to reselect the item that was selected before the refresh was started (there is only one item selected in all these grids). I do this by expanding the appropriate rows until I reach the grid with the item to be selected. Then I set that grid's SelectedItem property.

So far so good. For obvious reasons I want to scroll the selected item back into view. When the selected row was in the main grid, I can just perform a
grd.ScrollIntoView(objSel);
But when I do this for a childgrid, nothing happens. I presume because the child grid doesn't have a scrollbar and as far as this grid is concerned, the selected row is in view. Also when I try
grdMain.ScrollIntoView(objSel);
nothing happens. I guess because objSel is not in the ItemsSource of the main grid (I didn't expect it to work, but I had to try). Also
grd.BringIntoView();
did not work out.

So I wonder what is a correct approach to scroll the selected item into view.

Thanks in advance,
   Herre

[ OS: W7; Telerik: WPF 2013.3.1316.40 ]
Yoan
Telerik team
 answered on 13 Mar 2014
5 answers
203 views
I've got a FadeTransition set up, with some not too complicated content, which is simply supposed to fade. Instead, it zooms the content in, and then fades. It's like it's taking a snapshot of the old content at the wrong size or something. I can't quite reproduce it outside of the project I'm working on. As soon as the Content is changed, the transition control zooms in on the text, and then fade/zooms it. How do I make this simply a fade, without a zoom?

<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>
Vladi
Telerik team
 answered on 13 Mar 2014
2 answers
136 views
When you place a transition control in a ViewBox (specifically with the Fade transition, but mostly on all of them), it does a strange scaling.  The text starts out tiny, then goes large, then fades.  In other examples I have done, it starts out almost 2x as large as it should and then fades normally.  Is there a way to stop if from doing this?

See the below code example:

 
<Window x:Class="WpfApplication20.MainWindow"
        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();
        }
}


Vladi
Telerik team
 answered on 13 Mar 2014
1 answer
161 views
Hi,

I'm fairly new to WPF and I'm trying to achieve a look to my datagrids similar to yours from the demo applications.

In your demos, the radgridview(and other controls too like the listview) are wrapped by a telerikQuickstart:Quickstart.ExampleHeader object.

I'm trying to do the same but can't. Can you please point me in the right direction on how I would be able to wrap my datagrid in a similar object, and ideally
change the background color to a deep blue instead of the purple?

Thanks
aronluc28
Top achievements
Rank 1
 answered on 12 Mar 2014
2 answers
146 views
                   When I close a cofirm radwindow  (showdialog()), it won't focus on a textbox.  If I change it to a regular wpf window and close it, everything is fine.
When I debug it and step through it, it works so it could be some race condition.

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
danparker276
Top achievements
Rank 2
 answered on 12 Mar 2014
1 answer
306 views
Here is my code :
<Grid>
        <telerik:RadDiagram>
            <telerik:RadDiagramShape Position="100,50" Width="100" Height="80" Name="one"/>
            <telerik:RadDiagramShape Position="250,100" Width="100" Height="80" Name="two"/>
            <telerik:RadDiagramShape Position="350,200" Width="100" Height="80" Name="three"/>
            <telerik:RadDiagramConnection Source="{Binding ElementName=one}" Target="{Binding ElementName=three}" ConnectionType="Polyline"/>
        </telerik:RadDiagram>
    </Grid>

The RadDiagramConnection is still Straight,why ?
Martin Ivanov
Telerik team
 answered on 12 Mar 2014
1 answer
98 views
Attached is the grid layout that has been decided upon, I have worked with the standard WPF DataGrid I was wondering if the attached layout is possible with the GridView.  The Date column would be considered to be a group by and the comments and additional members would span across the three columns.  I know that I can get the desired effect with a single row and row details however the date and time columns would be smaller.

Just wondering if it would be possible to modify the grouping and row layout to get this effect.

Thanks
Dimitrina
Telerik team
 answered on 12 Mar 2014
2 answers
96 views
I am just wondering if the attached layout is possible by changing the group and row layouts of the GridView.

The date field would be the grouping field and the comments and additional members would span the 3 cells.  I know that I can get the desired effect with a single row and a details row however the date and time cells would be smaller.

Can the grouping be placed at the same level as the first row and can data span multiple cells?

Thanks.
Dimitrina
Telerik team
 answered on 12 Mar 2014
4 answers
221 views
Hi,telerik

I have to create chart by code and export into image with legend.
After reading your doc and related threads,unfortunately can't find
right answer how to create legend with code. My question is

1. Add legend into RadCartesianChart by code
    Following is my code.

  
RadCartesianChart cartChart = new RadCartesianChart();
          cartChart.HorizontalAxis = new LinearAxis() { Maximum = 50, Minimum = 17, MajorStep = 3 };
          cartChart.VerticalAxis = new LinearAxis() { LabelFormat = "p0" };
 
          var resultList = CordXy.GetMonthFecundity();
 
          ScatterLineSeries pregSeries = new ScatterLineSeries() { Stroke = new SolidColorBrush(Colors.Blue), StrokeThickness = 2 }; ;
          pregSeries.XValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Age" };
          pregSeries.YValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Num" };
 
          // ADD Legend
          pregSeries.LegendSettings = new SeriesLegendSettings() { Title = "TEST" };
           
          pregSeries.ItemsSource = resultList[0] as IEnumerable<CordXy>;
          cartChart.Series.Add(pregSeries);
 
          ScatterLineSeries delSeries = new ScatterLineSeries() { Stroke = new SolidColorBrush(Colors.Red), StrokeThickness = 2 }; ;
          delSeries.XValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Age" };
          delSeries.YValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Num" };
 
           // ADD Legend
          delSeries.LegendSettings = new SeriesLegendSettings() { Title = "TEST2" };
 
          delSeries.ItemsSource = resultList[1] as IEnumerable<CordXy>;
          cartChart.Series.Add(delSeries);
 
           // STUCK HERE...
          //cartChart.LegendItems.Add(pregSeries.LegendSettings);
          //cartChart.LegendItems.Add(delSeries.LegendSettings);

2. Export chart into image with legend
    All sample shows legend is placed outside of chart control.
    Is it possible to export chart with legend ? or Should I go back to outdated RadCharting ?

TIA.

RGDS
Kang



   




Yonggu Kang
Top achievements
Rank 1
Iron
 answered on 12 Mar 2014
3 answers
125 views
Hi,

We are using Telerik controls (2012.3.1129.40) and use theme support. Everything is working fine - user can select theme to use and appearance of application will change, but there are 2 scenarios that cause us headache.

Usecase 1:
I've changed style of control, for example FilteringControl of the RadGridView. In fact I needed small change in layout, so I changed template for the control, but because layout and appearance options in themes are mixed colors are redefined to. Using 'StyleManager.Theme="{x:Static StyleManager.ApplicationTheme}"' trick I can make some parts of the control to look consistent (buttons, listboxes) with other application parts, but there are things like backgroung/border colors defined in the template, that should be changed according to the theme. So from now on, whenever theme is changed FilteringControls look is inconsistent. I could redefine template for all other themes (just to change 3-5 color properties), but how can I specify which template should be used for which theme?

Usecase 2:
We have custom controls, that should match in theme with the rest of application. I accept to 'copy-paste' whole template for another theme just to change 2-3 color properties, but again how can I tell to theme manager which template should be used according to the selected theme?

Thank you


Vanya Pavlova
Telerik team
 answered on 12 Mar 2014
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?