Telerik Forums
UI for WPF Forum
0 answers
128 views
Is it possible to customize the xaxis labels?

We have a line series mapped from a linear (0 to 6) xaxis to a logarithmic scale.
The axis values go from 0 to 6, but we need the labels on the axis to reflect the custom scale. i.e. 0 would be the label "125 Hz", 1 would be the label "250 Hz", etc.

Is there any way to do this?

Thanks!

Please Disregard, the answer was posted in x-axis-as-a-string
John McElroy
Top achievements
Rank 1
 asked on 05 Feb 2009
4 answers
153 views
Hi,

I have two major problems - one is partial solved via setting IsLabelRotated to false.
The other is really a problem and I couldn't find anything in the documentation.

First of all -- is it possible to rotate all labels "Inside out".
Your kind of "auto rotation" is quite a bit irritateing :)

What I get - on a scale 0 - 100 with 10 is.
0, 10, 20 is "outside in" 30 to 70 is "inside out" and finally 80, 90 and 100 is again (in the oposite direction)
"outside in".
What I simply want is all inside out -- like with the radial (first) here http://www.david-black.info/bashboard/default.aspx

BUT: without rotation it is not exaxtly what I want - but at least "readable" - so not that problem.

The second thing is much more imporatant.
I display a value in the range from 0 to 255.
So it would be nice to have labels at 0, 20, 40, 60,....200, 220, 240, 255
All I found was "MajorTicks" which give me labels like 21, 43, 64... with 12 as value,
or 26, 51, 77... and so on if I keep the default of 10.

I was looking for something like "TickDistance" or "TickFrequency" -- but all I found was "MajorTicks"
which is an integer divider -- not really usefully for numbers like mine.
Of course it would work with 260 - and 13 --- but my users would be a bit irritatied if a display for an 8 bit A/D converter
shows number bigger than 255 :)

Waiting for you help

Manfred
Vlad
Telerik team
 answered on 04 Feb 2009
1 answer
124 views
Hi,
   I am using expanded event of the WPF Treeview to populate children of the parent node when the parent node is clicked.

I am binding my treeview with the collection. Collection has 2 things
a. Name
b. Commodity

On page load:

this

.RadTreeView.Items.Add(new RadTreeViewItem()

 

{

Header = "Name"

 

});

 

this.RadTreeView.Items.Add(new RadTreeViewItem()

 

{

Header = "Commodity"

 

});

Now I want to show the children under commodity on click of commodity (parent node).

 

private

void RadTreeView_Expanded(object sender, Telerik.Windows.RadRoutedEventArgs e) { 

 

 

 

 

 

RadTreeView objRadTreeView = sender as RadTreeView;

 

 

 

RadTreeViewItem objRadItem = e.OriginalSource as RadTreeViewItem;

 

 

 

CommodityCollection objCommodityCollection = this.CommodityCollection;

 

 

 

 

for (int i = 0; i < objCommodityCollection.Count; i++) {

 

 

 

 

 

 

objRadItem.Items.Add(

objCommodityCollection[i].CommodityName);

 

 

 

    }
}

 

Now the issue is when I run the application, as currently there are no child for commodity I am not getting expand icon on the left side of commodity (when the page is loaded) because of which Expanded event is not called.

How to resolve this issue?

 

 

 

Tihomir Petkov
Telerik team
 answered on 03 Feb 2009
3 answers
115 views
Hi,
   I have seen the demo of load on demand in your site but it uses Expanded event. There is event called LoadOnDemand in treeview, so my Question is how can we use this event to load child nodes on demand.

Also when I use Expanded event how will I know which parent node is been clicked .

 

private void RadTreeView_Expanded(object sender, Telerik.Windows.RadRoutedEventArgs e) {

 

 

    RadTreeView objRadTreeView = sender as RadTreeView;
}

 

Tihomir Petkov
Telerik team
 answered on 03 Feb 2009
1 answer
100 views
Hi,

since we had a lot of problem with your gauge (missing documentation as first thing) we decided to use other gauges in our silverlight applications.
We choose Dave's Silverlight Dashboard. (http://www.david-black.info/Bashboard/Default.aspx)
The reason - free including sourcecode.
AND - most important - it takes only a few line of XAML to get a nice looking gauge.
These work fine - but only for silverlight.

Your controls (I guess from reading) have the same codebase for Silverlight and WPF.
So since we would need your controls primarily for WPF I ask in this forum.

The above noted controls allowe two-way data binding.
http://www.david-black.info/Bashboard/Extras/Bidirection.aspx

Do you (in the near future) also think about implementing two way binding?

Regards

Manfred
Andrey
Telerik team
 answered on 03 Feb 2009
1 answer
101 views
I see there are descriptions in the docs/examples on how to do a programmatic initial sort. Is there a way to do a declarative initial sort?
I can't seem to get that to work.
Vlad
Telerik team
 answered on 02 Feb 2009
1 answer
68 views
I have a collection which contains two properties
1. ABC
2. XYZ

I want to make XYZ as the child of ABC For example:

.ABC1
    .XYZ1
    .XYZ2
.ABC2
    .XYZ3
    .XYZ4

I want to bind this in .XAML.CS page

Currently what I have done in XAML

 

<Telerik:RadTreeView x:Name="RadTreeView" DockPanel.Dock="Bottom"/>

 

 


In XAML.CS page
Collection is CommodityCollection

RadTreeViewItem

aa;

 

 

 

 

 

for (int i = 0; i < CommodityCollection.Count; i++) {

 

aa = new RadTreeViewItem();

 

 

 aa.Header = CommodityCollection[i].ABC;

 

this.RadTreeView.Items.Add(aa);


Now my problem is How to add child node in the RadTreeView?

 

 





Valentin.Stoychev
Telerik team
 answered on 30 Jan 2009
4 answers
107 views
Hi..
What event is fired when the carousel is 'moved' either by MoveBy or using the Horiz/Vertical  scrollbars?
Can the scrollbars be customized?
Thanks again.!
Nor
Top achievements
Rank 1
 answered on 29 Jan 2009
1 answer
159 views
Hi,
I've created a simple solution to test the RadTreeview.It just initializes a new ObservableCollection of Items like this:
 /// <summary> 
    /// Interaction logic for Window1.xaml 
    /// </summary> 
    public partial class Window1 : Window 
    { 
        public ObservableCollection<Item> Items 
        { 
            get { return (ObservableCollection<Item>)GetValue(ItemsProperty); } 
            set { SetValue(ItemsProperty, value); } 
        } 
 
        // Using a DependencyProperty as the backing store for Items.  This enables animation, styling, binding, etc... 
        public static readonly DependencyProperty ItemsProperty = 
            DependencyProperty.Register("Items"typeof(ObservableCollection<Item>), typeof(Window1)); 
 
        public Window1() 
        { 
            InitializeComponent(); 
            Items = new ObservableCollection<Item>(); 
 
            Items.Add(new Item("Item 1")); 
            Items.Add(new Item("Item 2")); 
            Items.Add(new Item("Item 3")); 
        } 
    } 
 
    public class Item 
    { 
        public string Header { getset; } 
        public ObservableCollection<Item> Items { getset; } 
 
        public Item(string header) 
        { 
            Header = header; 
            Items = new ObservableCollection<Item>(); 
        } 
    } 

and in xaml created a simple HierarchicalDataTemplate:
<Window.Resources> 
        <HierarchicalDataTemplate x:Key="NodeTemplate" ItemsSource="{Binding Path=Items}"
            <StackPanel Orientation="Horizontal"
                <TextBlock Text="{Binding Path=Header}"/> 
            </StackPanel> 
        </HierarchicalDataTemplate> 
    </Window.Resources> 
    <Grid> 
        <Telerik:RadTreeView IsDragDropEnabled="True" Name="t"  
                             ItemsSource="{Binding Path=Items, ElementName=window}"  
                             ItemTemplate="{StaticResource NodeTemplate}"
        </Telerik:RadTreeView> 
    </Grid> 

Now, when I am trying to drag "Item 1" to, lets say, "Item 2" it works ok. But if afterwards I am trying to drag "Item 3" to "Item 1" (that is now under "Item 2") I am getting a NullReferenceException with the following stack trace:
   at Telerik.Windows.Controls.RadTreeViewItem.CheckStatePropertyChangedConstrainValue(DependencyObject d, Object newValue) 
   at System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean skipBaseValueChecks) 
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) 
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal) 
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) 
   at Telerik.Windows.Controls.RadTreeViewItem.set_CheckState(ToggleState value) 
   at Telerik.Windows.Controls.RadTreeViewItem.SetCheckStateWithNoPropagation(ToggleState state) 
   at Telerik.Windows.Controls.RadTreeViewItem.Render(Boolean recursive) 
   at Telerik.Windows.Controls.RadTreeViewItem.OnItemsChanged(NotifyCollectionChangedEventArgs e) 
   at System.Windows.Controls.ItemsControl.OnItemCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) 
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) 
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) 
   at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e) 
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list) 
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args) 
   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) 
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) 
   at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex) 
   at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args) 
   at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) 
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) 
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item) 
   at System.Collections.ObjectModel.Collection`1.Add(T item) 
   at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Add(Object value) 
   at Telerik.Windows.Controls.RadTreeView.EndDrag() 
   at Telerik.Windows.Controls.RadTreeView.HandleMouseUp(MouseEventArgs e) 
   at Telerik.Windows.Controls.RadTreeView.RadTreeView_MouseLeftButtonUp(Object sender, MouseEventArgs e) 
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) 
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) 
   at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e) 
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) 
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) 
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) 
   at System.Windows.Input.InputManager.ProcessStagingArea() 
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) 
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) 
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) 
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) 
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) 
   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) 
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) 
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) 
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) 
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) 
   at System.Windows.Threading.Dispatcher.Run() 
   at System.Windows.Application.RunDispatcher(Object ignore) 
   at System.Windows.Application.RunInternal(Window window) 
   at System.Windows.Application.Run(Window window) 
   at System.Windows.Application.Run() 
   at Telerik.App.Main() in C:\Documents and Settings\talg\Desktop\TreeViewDrag\Telerik\Telerik\obj\Debug\App.g.cs:line 0 
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) 
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) 
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
   at System.Threading.ThreadHelper.ThreadStart() 

To make things even worse, it's not constant. It happens in about 50% of the tries.
Thank you in advance,
Tal
Ivan
Telerik team
 answered on 29 Jan 2009
1 answer
182 views
Just installed WPF with VS2008.
Want to get GridView to work.
I installed the .dlls in the toolbox as described here: http://www.telerik.com/help/wpf/adding-radcontrols-to-vs-toolbox.html

The following is what I pieced together from the online demo:

<Page x:Class="TestGridViewAggregate.Page1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
    Title="Page1">
    <Grid>
       <telerik:RadGridView></RadGridView>
    </Grid>
</Page>

However, it gives me the error:
"The tag 'RadGridView' does not exist in XML namespace clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView'"
Vlad
Telerik team
 answered on 28 Jan 2009
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?