Telerik Forums
UI for WPF Forum
2 answers
136 views
Hi,

I have an app with a TabControl. Each item in the TabControl has a RadTreeListView. When I switch between the tabs, the hierarchy in the RadTreeListView gets collapsed. The problem, of course, is that the IsExpanded states is preserved only in the RadTreeListView and TabControl virtualizes its contents, i.e. if there are three tabs, it only creates one RadTreeListView and when the user selects a tab, then only thing that changes is the RadTreeListView's DataContext.

The solution would be to bind each row's IsExpanded property to a property in my ViewModel. But from my reading of other posts in this forum, it appears that binding to a TreeListViewRow's IsExpanded property doesn't work.

How can I preserve the IsExpanded state when I switch between tabs?

Thanks,
    Bob Alexander
Bob
Top achievements
Rank 1
 answered on 19 Jul 2011
1 answer
118 views
I created a user control to display a scatter plot based on some given data. I needed to create dependency properties for the label/max/min of axes, and chart title in order to let the user change the properties while obfuscating the inner workings of the chart. The axes properties worked out fine because they were properties of the ChartArea class. The problem is that the ChartTitle property is a member of the ChartDefaultView class and when I apply the same logic as before with the ChartArea class, it doesn't work. Is there some kind of default value that I need to override or something?

This dependency property for the max value of the X-axis works 100% fine.

        public double XAxisMax
        {
            get { return (double)this.GetValue(XAxisMaxProperty); }
            set { this.SetValue(XAxisMaxProperty, value); }
        }

        public static readonly DependencyProperty XAxisMaxProperty =
            DependencyProperty.Register("XAxisMax", typeof(double), typeof(ScatterChart),
                new UIPropertyMetadata(1.0, new PropertyChangedCallback(XAxisMaxCallback)));

        static void XAxisMaxCallback(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            ScatterChart chart = (ScatterChart)obj;
            chart.ChartArea.AxisX.AutoRange = false;
            chart.ChartArea.AxisX.MaxValue = (double)args.NewValue;
        }

The one for the chart title on the other hand does not work.

        public string ChartTitle
        {
            get { return (string)this.GetValue(ChartTitleProperty); }
            set { this.SetValue(ChartTitleProperty, value); }
        }

        public static readonly DependencyProperty ChartTitleProperty =
            DependencyProperty.Register("ChartTitle", typeof(string), typeof(ScatterChart),
                new UIPropertyMetadata(string.Empty, new PropertyChangedCallback(ChartTitleCallback)));

        static void ChartTitleCallback(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            ScatterChart chart = (ScatterChart)obj;
            chart.DefaultView.ChartTitle.Content = (string)args.NewValue;
        }

Any idea what might be wrong?
Giuseppe
Telerik team
 answered on 19 Jul 2011
1 answer
298 views
Hi all,
I have two questions:

I have in a WPF form a RadMap control.
1) The only way I know to see the pushpin tooltip is moving the mouse over it.
If in a map I added 10 pushpin is it possible to see simultaneally all the tooltip after the map is loaded?

2) Is it possible to open a new form clicking on the tooltip?



var pin = new Pushpin { Background = new SolidColorBrush(colore) };
var tip = new ToolTip { Content = tool };
ToolTipService.SetToolTip(pin, tip);
var loc = new Location { Latitude = lat, Longitude = lon };
MapLayer.SetLocation(pin, loc);
informationLayer.Items.Add(pin);


Thanks in advance...

Andrey
Telerik team
 answered on 19 Jul 2011
1 answer
93 views
The QAT Customize dropdown menu dropdown menu loses Show Above/Below Ribbon menu item after first change in position.  This can be seen in the Demos and apparently occurs for all themes.  RadRibbonBar has the same problem.

Thanks in advanced,
Steve
Petar Mladenov
Telerik team
 answered on 19 Jul 2011
1 answer
187 views
Hello,

I am using the NumericUpDown with a binding to a nullable short property on my ViewModel. The NumericUpDown is declared as follows

<telerik:RadNumericUpDown Value="{Binding Path=CurrentOEMOriginalQuantity, ValidatesOnDataErrors=True}" Grid.Row="1" Grid.Column="2" Margin="0,0,2,0"
                                                              NumberDecimalDigits="0" UpdateValueEvent="PropertyChanged" ShowButtons="False" NullValue=""/>

And the ViewModel property is defined as

public short? CurrentOEMOriginalQuantity
    {
      get
      {
        if (adapter == null || adapter.CurrentOEMOriginalCost == null)
          return null;
        else
          return adapter.CurrentOEMOriginalCost.QuantityOnHand;
      }
      set
      {
        if (adapter == null || adapter.CurrentOEMOriginalCost == null)
          return;
 
        adapter.CurrentOEMOriginalCost.QuantityOnHand = value;
        RaisePropertyChanged(() => this.CurrentOEMOriginalQuantity);
      }
    }

However, the value that is displayed on load is a 0.  I put a breakpoint in the getter of the property and it is indeed returning null.

What am I missing here?

Thanks.
Valeri Hristov
Telerik team
 answered on 19 Jul 2011
1 answer
109 views
Hi,

In my application I need to scroll the current time into view, and I therefore call the ScrollIntoview-method with a DateTime-object as parameter. In the Q1 release this was working fine, but in the Q2 release it seems this is no longer supported. (I get an InvalidCastException that says "Unable to cast object of type 'System.DateTime' to type 'Telerik.Windows.Controls.ScheduleView.IDateSpan'.")

Is this an intended change? If so, how can I to scroll a specified DateTime (or TimeSpan) into view in the Q2-release?


Thanks,
Kristian
Rosi
Telerik team
 answered on 19 Jul 2011
1 answer
106 views
Hello

I want to know how can i get the Header text while clicking on that header. I just want to get the header value. No sorting nothng i want to preform on the grid.

Calvin
Top achievements
Rank 2
 answered on 18 Jul 2011
1 answer
117 views
Is there a setting which will allow me to place duplicate entries into a RadTreeView?  I am dragging from a GridView into a TreeView, and sometimes I need to allow the user to place the same object more than once.  I need to create the following tree:

Bird
--Cardinal
--Cardinal
--BlueJay
--BlueJay

I also see the following issue.  When I have this tree:

--Bird

I can drop Cardinal to get:

--Bird
--Cardinal

If I Try to add another Cardinal, I need to "Drop After" Bird, because I can't "Drop Before" or "Drop After" Cardinal, since it has the same object properties, I get the DropImpossible icon everywhere overtop of Cardinal.  This is a problem because everyone wants to drop at the end of the list, which is considered over Cardinal.

Finally, if I create a tree with duplicate entries anyway, the tree gets re-ordered, and the selected items act very strangely also.

I will try to create:

--Bird
----Cardinal
----BlueJay
----Cardinal

and when I drag and drop them in that order, it will be re-ordered to:

--Bird
----Cardinal
----Cardinal
----BlueJay

If I select the Child item Cardinal, it might select the other Cardinal item instead.

Thanks for your help,
Scott
Petar Mladenov
Telerik team
 answered on 18 Jul 2011
0 answers
153 views

Hi, i've a RadGridview which populates its datasource from a dataset.
i just need to get selected item's 2nd row's value.

 

(guess need to write in MyGrid_SelectionChanged event.)

 

How can i achieve this ?
Thanks for ur help
Best regards..

Kenz
Top achievements
Rank 1
 asked on 18 Jul 2011
1 answer
1.0K+ views
Hi all,
I have in a WPF form a RadMap control. Normally for show the tooltip information I have to click on every pushpin.
Is it possible to open automatically all the pushpin's tooltip?

Another question...
Is it possible to click inside the tooltip for open another form?

thanks in advance!!!

var pin = new Pushpin { Background = new SolidColorBrush(colore) };
var tip = new ToolTip { Content = tool };
ToolTipService.SetToolTip(pin, tip);
var loc = new Location { Latitude = lat, Longitude = lon };
MapLayer.SetLocation(pin, loc);
informationLayer.Items.Add(pin);
Andrey
Telerik team
 answered on 18 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?