Telerik Forums
UI for WPF Forum
1 answer
184 views

I am trying to set the selected Item of a TreeListView by code (two way binding), but I see the selected item is set back to null by telerik on few cases. 

Have a complex hierarchy tree structure, their child parent level goes down to 10 level at-least. I am trying to set the selected item by code when some one picks the respective item from some where else. And I see, the selected item is set to null by telerik code when an at-least two ancestors nodes are collapsed, but works only one ancestor node is collapsed or when the ancestor nodes are expanded. Not sure about this behavior, could you explain this behavior ? and is there any work around ? 

  Anand

Dimitrina
Telerik team
 answered on 15 Apr 2015
1 answer
129 views

Hi,

 We are using Rad Map in one of our application where we have used Visualization Layer to show labels on the map.

As per our requirement we need to show current position of active device on map. To make it functional we are using timer to get updated position of the device at regular interval and then we are binding the data with Map using Visualization Source class.   But each time when we are binding the data labels on the map are blinking. 

 

 

 

Petar Mladenov
Telerik team
 answered on 15 Apr 2015
3 answers
423 views

Hi,

 

When I add a new item to the bound collection in my view model the radgridview scrolls to the top on its own.

How to prevent this from happening ? I saw a similar thread with no solution : http://www.telerik.com/forums/disable-scroll-on-changing-collection

Dimitrina
Telerik team
 answered on 15 Apr 2015
5 answers
119 views

Hi, 

 

I need my scatter graph to have equal x and y spacings so the grid lines will appear square. I've attached images of the default spacing I currently have and the square spacing I need.

 

Thanks for any help,

Milena
Telerik team
 answered on 15 Apr 2015
1 answer
75 views

As the title suggests, I'm trying to work with the max value of the gauge with my data and I'm having little luck. I am fairly new to telerik/wpf, so maybe that's also part of the issue, but what I'm wanting to do is stop the needle at the maximum value (my gauge goes from 0-200, if it's over that value, it just continues along the gauge until it goes past 0 again and the data is skewed). 

 

I've seen an example somewhere of a gauge that when the maximum is exceeded, it stops there and kind of bounces back and forth, as if to indicate it's trying to reach past that point but can't. Is there a way to do this that I'm unaware of?

Pavel R. Pavlov
Telerik team
 answered on 15 Apr 2015
2 answers
233 views

Hello. I downloaded Shell demo application.

https://github.com/telerik/xaml-sdk/tree/master/Docking

(xaml-sdk/Docking/ShellPrism)

After I updated all telerik references I run this demo but I receive empty window.(The view doesn't appears in the ribbon)

Is anything wrong with this example?

Vladi
Telerik team
 answered on 15 Apr 2015
4 answers
151 views

Hi. I have question : When i change selected item the animation begins with the color spesified in Them. And it's not comfortable that my screen is always white in "Windows8Touch" them for example. How can i change color while transiting ?

 

<telerik:RadTileView
            x:Name="RadTileViewMain"
            HorizontalAlignment="Stretch"  
            VerticalAlignment="Stretch"
            Margin="5"
            TileStateChangeTrigger="SingleClick"  
            telerik:StyleManager.Theme="Windows8Touch" Background="{Binding UISettings.BackColorBrush, NotifyOnTargetUpdated=True}" IsAutoScrollingEnabled="True" MinimizedColumnWidth="150" MinimizedRowHeight="125" MaximizeMode="One" PreservePositionWhenMaximized="True" ReorderingDuration="0:0:0.2" ResizingDuration="0:0:0.2" IsVirtualizing="True"
            >
            <telerik:RadFluidContentControl  telerik:StyleManager.Theme="Windows8Touch" Background="{Binding UISettings.BackColorBrush, NotifyOnTargetUpdated=True}" MouseDown="RadFluidContentControl_MouseDown" TransitionDuration="0:0:0.4" ScrollViewer.CanContentScroll="True" SnapsToDevicePixels="True">
                <telerik:RadFluidContentControl.Content>
                    <Grid Background="{Binding UISettings.BackColorBrush, NotifyOnTargetUpdated=True}" Cursor="Hand">
                    </Grid>
                </telerik:RadFluidContentControl.Content>
                <telerik:RadFluidContentControl.SmallContent  >
                    <Grid Background="{Binding UISettings.BackColorBrush, NotifyOnTargetUpdated=True}" Cursor="Hand">
                        <StackPanel Orientation="Vertical" >
                            <Image Height="30"
                                Source="{Binding UISettings.ThemType, ConverterParameter=sms-settings.png, Converter={StaticResource BtnConverter}, NotifyOnSourceUpdated=True}"
                                HorizontalAlignment="Stretch" VerticalAlignment="Stretch"   />
                            <Label Foreground="{Binding UISettings.ForeColorBrush, NotifyOnTargetUpdated=True}" Content="{Binding Source={StaticResource Localization_WorkMode}}" x:Name="label1"  VerticalAlignment="Center"   HorizontalAlignment="Center" Margin="5,0,0,0" FontSize="16"  Tag="0"  />

                        </StackPanel>
                    </Grid>
                </telerik:RadFluidContentControl.SmallContent>
                <telerik:RadFluidContentControl.LargeContent>
                    <Grid Background="{Binding UISettings.BackColorBrush, NotifyOnTargetUpdated=True}" >
                        <Label x:Name="ModeSettings"/>
                    </Grid>
                </telerik:RadFluidContentControl.LargeContent>
            </telerik:RadFluidContentControl>

Pavel R. Pavlov
Telerik team
 answered on 15 Apr 2015
4 answers
188 views

How to limit a TextBox that belongs to DataFormDataField to XXX number of characters?

Thanks,

<telerik:DataFormDataField  Grid.Row="1" Label="Name" DataMemberBinding="{Binding Name, Mode=TwoWay}" Description="Enter Name" />

Dimitrina
Telerik team
 answered on 14 Apr 2015
1 answer
119 views

Hi guys, our centralized log management system reported the following unhandled exception on a customer's PC.

It seems something related to the OnMouseLeftButtonUp event on RadToggleButton control, but I'm not able to reproduce it on my machine.

Maybe you can help me?

The machine is running Windows 7 SP1 32-bit (Microsoft Windows NT 6.1.7601 Service Pack 1).

Here is the full stack trace of the error: 

System.NullReferenceException: La reference d'objet n'est pas definie e une instance d'un objet.
 Telerik.Windows.Controls.Docking.PaneGroupBase.ShowContextMenu(PaneGroupBase paneGroup, ExecutedRoutedEventArgs e)
 Telerik.Windows.Controls.Docking.PaneGroupBase.OnContextMenuCommandInvoke(Object sender, ExecutedRoutedEventArgs e)
 System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
 System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
 System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
 System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
 System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
 System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
 System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
 System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
 System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
 System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
 MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
 System.Windows.Controls.Primitives.ButtonBase.OnClick()
 Telerik.Windows.Controls.RadToggleButton.OnClick()
 System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
 Telerik.Windows.Controls.RadToggleButton.OnMouseLeftButtonUp(MouseButtonEventArgs e)
 System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
 System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
 System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
 System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
 System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
 System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
 System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
 System.Windows.Input.InputManager.ProcessStagingArea()
 System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
 System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
 System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
 System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler).

Geri
Telerik team
 answered on 14 Apr 2015
1 answer
93 views

 I've been using samples from the SDK along with this post   http://www.telerik.com/forums/accessing-the-dbf-file  but have failed to do what I'm hoping should be simple ;-)

 I need to show a map of the U.S. with the states as shapes, color coded to a value that I set dynamically.   E.g. population, average income, total number of hospital beds, etc.  The values (1 for each state) are provided by my underlying model based on user selections on the screen.    E.g.  User sees a combo box listing the various variables to map, picks one, and the map colors the states based on 1 value per state.  

 Looking at the examples, it seems I need 2 files .. 

  • A "shp" file that contains the actual shape definition.  I downloaded U.S. state shape file from http://www.arcgis.com/home/item.html?id=f7f805eb65eb4ab787a0a3e1116ca7e5
  • A "dbf" file that contains some data that is magically keyed to the items in the shp file. The corresponding dbf file from the above site has only basic data such as Name, FIPS code, etc. 

Since the values that will drive the color of the shapes can only be determines at run-time, I'd like to just have a call-back, or some method, to provide a value to each of the 50 state shapes.   

I thought the Telerik Forum's post (above)  above link would solve my problem, but I get a compile error on a couple lines, and I'm wondering if this is a Silverlight vs WPF issue, or a version issue or a simple case of user error.  on the following 2 statements.  this.informationLayer.Reader does not have a "Source" or a "DataSource" property.   (also please see attached screenshot) 

this.informationLayer.Reader.Source = new Uri(string.Format(ShapeRelativeUriFormat, "world.shp"), UriKind.Relative);
this.informationLayer.Reader.DataSource = new Uri(string.Format(ShapeRelativeUriFormat, "world.dbf"), UriKind.Relative);

My Xaml is pasted below.   I've tried to  attached the project files in a zip file, but it is over 2Meg.  It is actually the sample from the SDK browser with a few lines of code as suggested by the forum link above.... 

Thanks for your advice. 

 

<Window x:Class="InformationLayerColorizerModeCount.MainWindow"
        Title="MainWindow" Height="800" Width="1200">
    <Grid>
        <telerik:RadMap x:Name="radMap" InitializeCompleted="radMap_InitializeCompleted">
            <telerik:RadMap.Provider>
                <telerik:EmptyProvider />
            </telerik:RadMap.Provider>
            <telerik:InformationLayer x:Name="informationLayer">
                <telerik:InformationLayer.Reader>
                    <telerik:MapShapeReader DataSource="/InformationLayerColorizerModeCount;component/Resources/world.dbf"
                                            Source="/InformationLayerColorizerModeCount;component/Resources/world.shp" />
                </telerik:InformationLayer.Reader>
                <telerik:InformationLayer.Colorizer>
                    <telerik:ColorMeasureScale ExtendedPropertyName="SQKM" Mode="Count" TickMarkCount="7">
                        <telerik:ColorMeasureScale.ShapeFillCollection>
                            <telerik:MapShapeFill Fill="#FFFAB935" Stroke="White" StrokeThickness="2" />
                            <telerik:MapShapeFill Fill="#FFC9441C" Stroke="White" StrokeThickness="2" />
                        </telerik:ColorMeasureScale.ShapeFillCollection>
                    </telerik:ColorMeasureScale>
                </telerik:InformationLayer.Colorizer>
            </telerik:InformationLayer>
        </telerik:RadMap>
    </Grid>
</Window>

 

Petar Mladenov
Telerik team
 answered on 14 Apr 2015
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?