Telerik Forums
UI for WPF Forum
1 answer
208 views
Hi

I have a RadPane that contains a WrapPanel and a RadRichTextBox.  The RadPane has a MouseDown event that does not fire. I use this code for all of my RadPanes to show and hide an appbar.  I can get around this problem by putting the RightButtonmousedown event in the WrapPane aand RichTextBox.  This would be special code for a RadPane as all the others use a common routine.  In searching the forum I found the following:  (Is this still an issue or is there something I am missing?).


Posted on Apr 9, 2012 (permalink)
,
This behavior is caused by the RadRichTextBox control handling the mouse down event
and not handling the mouse up event, which respectively stops the hit testing and 
deselects the shape. We are currently working on resolving this. In the meantime, 
what you can try is to handle the PreviewEndEdit event of the RadDiagramShape class
and handle it so that the shape does not exit edit mode. This needs to be done only
when the rich textbox control has been hit (mouse left down).

Regards,
Alex Fidanov 
the Telerik team
Iva Toteva
Telerik team
 answered on 24 Apr 2013
4 answers
115 views
Hi all,

It seems like I've hit a limitation with the RadPropertyGrid.
I have a class which has a few children and these children have other children. At the deepest level, the class has some primitive properties like int's and strings. When binding to an instance of the parent class with the children populated, the grid does not display their values. It does show the property names.

So consider the following object graph:

Class A
- Class B
-- Class C
--- A = 1
--- B = 2
--- C = 3
--- D = 4
--- Name = "Test"

It shows the output in attached screenshot 01.

What's even more strange is the following:
When I add a property to Class A & Class B of type Class C and give them all the same name but set different instances of the class C, then all will display the values of the instance directly under A.
See screenshot 02 for output, very strange behavior.

I does display a binding error when collapsing the deeper nested levels...

Hope someone from Telerik can clear up some confusion.

A vs2010 solution can be found at the following url in which you can see the explained behaviour.
h ttp://www.filedropper.com/propertygridtest

Kind regards,
Dwight
Yoan
Telerik team
 answered on 24 Apr 2013
11 answers
290 views
Can I use a non dbf format DataSource (i.e. something external like a web service data source) with an ESRI shapefile?
Andrey
Telerik team
 answered on 24 Apr 2013
0 answers
121 views
I need to know how can we populate(here "Column name") in "Insert merge field in Editor with the help of Dataset. For reference i put my code here to give you an idea;.....need quick response,thanks

ServiceReference1.LetterServiceClient letterservice = new ServiceReference1.LetterServiceClient();
            DataSet ds = letterservice.ExecuteTagSchema("SearchPatient");
            List<string> listTemp = new List<string>();

            foreach (DataColumn item in ds.Tables[0].Columns)
            {
                listTemp.Add(item.ColumnName);
            }
            this.DataContext = listTemp;
            this.radRichTextBox.Document.MailMergeDataSource.ItemsSource = listTemp;
            this.radRichTextBox.DocumentChanged += editor_DocumentChanged;
        }
Vitall
Top achievements
Rank 1
 asked on 24 Apr 2013
3 answers
181 views
Hi there

I've downloaded the WPF trial and I'm currently testing the latest version of RadDocking, but I've encountered a little problem.
When I relocate the two most right radpanes to the left and reload the window, the other two panes (not dockable) don't stretch to fill the whole window. You can find two images (before save and after save) below this post. 
Also my XAML-code:
<t:RadDocking x:Name="radDocking" HasDocumentHost="False" DragDropMode="Deferred">
        <t:RadDocking.CompassStyle>
            <Style TargetType="t:Compass">
                <Setter Property="IsCenterIndicatorVisible" Value="false" />
                <Setter Property="IsLeftIndicatorVisible" Value="false" />
                <Setter Property="IsRightIndicatorVisible" Value="false" />
            </Style>
        </t:RadDocking.CompassStyle>
        <t:RadDocking.RootCompassStyle>
            <Style TargetType="t:RootCompass">
                <Setter Property="IsTopIndicatorVisible" Value="false" />
                <Setter Property="IsBottomIndicatorVisible" Value="false" />
            </Style>
        </t:RadDocking.RootCompassStyle>
 
        <t:RadSplitContainer>
            <!--Left-->
            <t:RadSplitContainer InitialPosition="DockedLeft" Orientation="Vertical"
                                 t:ProportionalStackPanel.RelativeSize="200,200">
                <t:RadPaneGroup AllowDrop="False"
                                t:ProportionalStackPanel.RelativeSize="200,100">
                    <t:RadPane PaneHeaderVisibility="Collapsed" CanFloat="False" CanUserClose="False" CanDockInDocumentHost="False"
                                CanUserPin="False" ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Customer"/>
                </t:RadPaneGroup>
 
                <t:RadPaneGroup AllowDrop="False"
                                t:ProportionalStackPanel.RelativeSize="200,300">
                    <t:RadPane PaneHeaderVisibility="Collapsed" CanFloat="False" CanUserClose="False" CanDockInDocumentHost="False"
                                CanUserPin="False" ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Ticket" />
                </t:RadPaneGroup>
            </t:RadSplitContainer>
 
            <!--Right-->
                <t:RadSplitContainer InitialPosition="DockedRight" Orientation="Vertical"
                                t:ProportionalStackPanel.RelativeSize="50,200">
                    <t:RadPaneGroup>
                        <t:RadPane Header="Boven" CanUserClose="False" CanUserPin="False" CanFloat="False"
                        ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Number">
                        </t:RadPane>
                    </t:RadPaneGroup>
 
                    <t:RadPaneGroup>
                        <t:RadPane Header="Onder" CanUserClose="False" CanUserPin="False" CanFloat="False"
                            t:RadDocking.SerializationTag="Other" ContextMenuTemplate="{StaticResource PaneContextMenuTemplate}" />
                    </t:RadPaneGroup>
                </t:RadSplitContainer>
 
        </t:RadSplitContainer>
 
        <!--Bottom-->
        <t:RadSplitContainer InitialPosition="DockedBottom">
            <t:RadPaneGroup Height="100">
                <t:RadPane PaneHeaderVisibility="Collapsed" Header="Output" IsPinned="False" CanFloat="False" CanUserClose="False" CanUserPin="False"
                    ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Bottom"  />
            </t:RadPaneGroup>
        </t:RadSplitContainer>
 
    </t:RadDocking>


Another question:
Can I move two dockable panes as one with one dockable pane and leave the possibility to change the position of the two inner dockable panes inside the 'root' dockable pane?
I've attached an image (TwoInOne.png) about my question. Here also some explainnig XAML-code:
<t:RadPaneGroup>
                <t:RadPane>
                    <t:RadSplitContainer InitialPosition="DockedRight" Orientation="Vertical"
                                t:ProportionalStackPanel.RelativeSize="50,200">
                        <t:RadPaneGroup>
                            <t:RadPane Header="Boven" CanUserClose="False" CanUserPin="False" CanFloat="False"
                        ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Number">
                            </t:RadPane>
                        </t:RadPaneGroup>
 
                        <t:RadPaneGroup>
                            <t:RadPane Header="Onder" CanUserClose="False" CanUserPin="False" CanFloat="False"
                            t:RadDocking.SerializationTag="Other" ContextMenuTemplate="{StaticResource PaneContextMenuTemplate}" />
                        </t:RadPaneGroup>
                    </t:RadSplitContainer>
                </t:RadPane>
            </t:RadPaneGroup>

When I try this with the above code, I receive a NullReferenceException.
System.NullReferenceException was unhandled by user code
  HResult=-2147467261
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.Docking
  StackTrace:
       bij Telerik.Windows.Controls.RadPaneGroup.IsSourceDockingCurrentDock(IDataObject draggedPayload) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadPaneGroup.cs:regel 1656
       bij Telerik.Windows.Controls.RadPaneGroup.OnDragOver(Object sender, DragEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadPaneGroup.cs:regel 1564
       bij Telerik.Windows.DragDrop.DragEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragEventArgs.cs:regel 202
       bij System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       bij System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       bij System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       bij System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       bij System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       bij Telerik.Windows.DragDrop.IInputElementExtensions.RaiseEvent(DependencyObject d, RoutedEventArgs routedEventArgs) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DependencyObjectExtensions.cs:regel 82
       bij Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnDragEventHandler(Object sender, DragEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragDropManager.cs:regel 1737
       bij Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnOver(Object sender, DragEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragDropManager.cs:regel 1812
       bij System.Windows.DragEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       bij System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       bij System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       bij System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       bij System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       bij System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       bij System.Windows.OleDropTarget.RaiseDragEvent(RoutedEvent dragEvent, Int32 dragDropKeyStates, Int32& effects, DependencyObject target, Point targetPoint)
       bij System.Windows.OleDropTarget.MS.Win32.UnsafeNativeMethods.IOleDropTarget.OleDragOver(Int32 dragDropKeyStates, Int64 point, Int32& effects)
  InnerException:

Thanks in advance
Lowie
Vladi
Telerik team
 answered on 24 Apr 2013
1 answer
280 views
Hi,

I have a context menu used to add and remove rows. I also have the InsertRow present.

I would like to know if its possible to disable the context menu when the user has used the InsertRow and has focused on the new row

Thanks

Arthur
Yoan
Telerik team
 answered on 24 Apr 2013
1 answer
192 views

Hello
We are using RadMap with ILayers as source in one of our InformationLayers. WMS requests (Web Map Services) returns an image witch is binded to the informationlayers source.
Between version 2012.2 and 2012.3 there is a difference. I can see a new event related to Multiscale image, MultiScaleImage.RaiseMotionFinishedEvent.AnonymousMethod. I don’t know what courses my problems, but if I uses version 2012.2 my program works, and there is no such event.
 
The error occurs while using MapZoomBar + and – navigation buttons.
I start with zoomlevel 18 viewing both MapProvider and the WMS image. Then I push + button in the MapZoomBar. This leads to an http request with an image result. My Image is loading perfectly in zoomlevel 19. When I push – button my MapProvider loads in zoomlevel 18, but there is no WMS image. When I again push + button in the MapZoomBar my image is not loaded anymore in zoomlevel 19. Map center, width and height are not changing.
 
If I use the mouse wheel and do the same thing as described, zoom in and out, everything works fine. 

Is this fixed/changed in Q1 2013 ?

Andrey
Telerik team
 answered on 24 Apr 2013
3 answers
94 views
Version: 2013 Q1 with SP1

In a RadChart with zoom enabled, trying to zoom-in causes automatic removal of the underlying DataSeries object from the ChartArea.DataSeries collection. I have attached some sample code that reproduces the issue. Note that this behavior is reproduced both programatically, and through UI interaction (by resizing the zoom bar).

XAML code:

<Window
    x:Class="MainWindow"
    Title="MainWindow" Height="350" Width="525"
    Loaded="Window_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <telerik:RadChart
        Name="chart" telerik:StyleManager.Theme="Summer" MaxWidth="5000" MaxHeight="5000"
        FontFamily="Segoe UI" FontSize="10" Background="Transparent" PaletteBrushesRepeat="False">
            <telerik:RadChart.DefaultView>
                <telerik:ChartDefaultView>
                    <telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartLegend
                        Name="chLegend" Background="Transparent" UseAutoGeneratedItems="True"
                        FontSize="9" IsHitTestVisible="False"/>
                    </telerik:ChartDefaultView.ChartLegend>
                    <telerik:ChartDefaultView.ChartArea>
                        <telerik:ChartArea EnableAnimations="True" LegendName="chLegend">
                            <telerik:ChartArea.AxisX>
                                <telerik:AxisX/>
                            </telerik:ChartArea.AxisX>
                            <telerik:ChartArea.AxisY>
                                <telerik:AxisY/>
                            </telerik:ChartArea.AxisY>
                            <telerik:ChartArea.AnimationSettings>
                                <telerik:AnimationSettings TotalSeriesAnimationDuration="00:00:00.600" />
                            </telerik:ChartArea.AnimationSettings>
                            <telerik:ChartArea.DataSeries>
                                <telerik:DataSeries LegendLabel="Product Sales">
                                    <telerik:DataSeries.Definition>
                                        <telerik:BarSeriesDefinition/>
                                    </telerik:DataSeries.Definition>
                                </telerik:DataSeries>
                            </telerik:ChartArea.DataSeries>
                        </telerik:ChartArea>
                    </telerik:ChartDefaultView.ChartArea>
                </telerik:ChartDefaultView>
            </telerik:RadChart.DefaultView>
        </telerik:RadChart>
 
        <Button x:Name="btnSetZoom" Grid.Row="1" Padding="3" Content="Click to set zoom" HorizontalAlignment="Right" Click="btnSetZoom_Click"/>
    </Grid>
</Window>

VB code behind:

Imports Telerik.Windows.Controls.Charting
 
Class MainWindow
 
    Private Sub btnSetZoom_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
        Me.SetZoom()
    End Sub
 
    Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs)
        Me.InitChart()
        Me.GenerateData()
    End Sub
 
    Private Sub InitChart()
        With Me.chart.DefaultView.ChartArea.AxisX
            .AutoRange = True
            .IsZeroBased = True
        End With
        With Me.chart.DefaultView.ChartArea.AxisX
            .AutoRange = True
            .IsZeroBased = True
        End With
 
        Dim zoomX As ZoomScrollSettings = chart.DefaultView.ChartArea.ZoomScrollSettingsX
        zoomX.ScrollMode = ScrollMode.ScrollAndZoom
        zoomX.RangeStart = 0
        zoomX.RangeEnd = 1
        Dim zoomY As ZoomScrollSettings = chart.DefaultView.ChartArea.ZoomScrollSettingsY
        zoomY.ScrollMode = ScrollMode.ScrollAndZoom
        zoomY.RangeStart = 0
        zoomY.RangeEnd = 1
    End Sub
 
    Private Sub GenerateData()
        Dim data As New List(Of DataPoint)()
 
        For Each i In Enumerable.Range(0, 20)
            Dim p = New DataPoint(i, i + 1.0)
            data.Add(p)
        Next
 
        Me.chart.DefaultView.ChartArea.DataSeries(0).AddRange(data)
    End Sub
 
    Private Sub SetZoom()
        Dim zoomX As ZoomScrollSettings = chart.DefaultView.ChartArea.ZoomScrollSettingsX
        zoomX.RangeStart = 0.2
        zoomX.RangeEnd = 0.7
    End Sub
 
End Class
Peshito
Telerik team
 answered on 24 Apr 2013
2 answers
175 views
I really messed up to populate data in WPF Telerik RadRichtextbox, I'm getting dataset from WCF service named as "LetterServiceClient" and now want to populate data in "Mailing"-->"Insert merge field" dropdown, but failed to do so. For your reference i also attached a screen shot to give you a clear look. 
MainWindow.xaml

<telerik:RadRibbonDropDownButton 
         x:Name="ddinsert" 
         Content="" 
         CollapseToMedium="WhenGroupIsMedium" 
         LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertMergeField.png"            
         telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertMergeFieldEmptyCommand}" 
         Size="Large" 
         Text="Insert Merge Field" 
         telerik:ScreenTip.Title="Insert Merge Field" 
         />
MainWindow.cs

 private void bindData()
    {
        ServiceReference1.LetterServiceClient letterservice = new ServiceReference1.LetterServiceClient();
        DataSet ds = letterservice.ExecuteTagSchema("SearchPatient");
        List<string> listTemp = new List<string>();
        int i = 0;
        foreach (DataColumn item in ds.Tables[0].Columns)
        {
            listTemp.Add(item.ColumnName);
        }

        this.ddinsert.DataContext = listTemp.ToArray();

        //this.radRichTextBox.Document.MailMergeDataSource.ItemsSource = listTemp.ToArray();
        //this.radRichTextBox.Document.MailMergeDataSource.ItemsSource= listTemp.ToArray();
    }
Vitall
Top achievements
Rank 1
 answered on 24 Apr 2013
5 answers
319 views
My WPF application runs on computers installed in police cars.  As such, it needs to have a "night mode" that has more subdued colors that don't hurt the officer's eyes in the dark.

My application has a search screen which contains a couple of RadDateTimePicker controls.  I've made a copy of the default template for the RadCalendar control that is contained in the RadDateTimePicker control's drop down area and I've been changing the XAML so it uses dynamic resource brushes defined in merged dictionaries.  The switch to night mode and back to day mode is used by changing the merged dictionary to one that has other brushes with the same names but different colors.

My problem is in the CalendarButton controls that make up the calendar.  They contain a Telerik ButtonChrome control which does not have any color properties.  When I open my application and use Snoop to look at the drop down after opening it, I can see that the ButtonChrome control contains a grid that contains a number of Border controls in it.  Those Border controls are not in the XAML; they must be created by the ButtonChrome.

The problem is that the colors used by the ButtonChrome don't work with my color scheme.  I have to use a dark background with lighter colors in the foreground for night mode.  The colors in that ButtonChrome are just the opposite.  There's no obvious way using XAML that I can change the colors used by the ButtonChrome.

Is there any way I can change the colors used without having to write my own ButtonChrome class?

I am using RadControls for WPF version 2013.1.220.45.
Tony
Top achievements
Rank 1
 answered on 23 Apr 2013
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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?