Telerik Forums
UI for WPF Forum
1 answer
106 views
Is it possible to add scroll bars to the mail merge field drop-down box? Our mail merge source can have 15+ fields in it. When a user is editing RTB content and clicks the Insert Merge Field button the list pops up but half the fields are not visible and there's no way to scroll the list. Does this require handling the insert command and customizing the drop-down? Even turning on CanVerticallyScroll doesn't seem to help.

Steve
Steven
Top achievements
Rank 1
 answered on 04 Apr 2014
5 answers
235 views
No matter which value I use for TabStripPlacement, it's drawn at the top.  Why?

Sample:

<Window 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    x:Class="Testing" 
    x:Name="Window" 
    Title="Workspace" 
    Width="640" Height="480"
 
    <DockPanel x:Name="LayoutRoot"
        <telerikDocking:RadDocking> 
            <telerikDocking:RadDocking.DocumentHost> 
                <telerikDocking:RadSplitContainer> 
                    <telerikDocking:RadPaneGroup TabOrientation="Horizontal" TabStripPlacement="Bottom">                     
                        <telerikDocking:RadPane x:Name="Case000001Pane" Header="CR000001" CanFloat="False" CanUserPin="True"
                            <TextBlock FontSize="18.667" Text="Case 000001" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center"/> 
                        </telerikDocking:RadPane> 
                        <telerikDocking:RadPane x:Name="Case000002Pane" Header="CR000002" CanFloat="False" CanUserPin="True"
                            <TextBlock FontSize="18.667" Text="Case 000002" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center"/> 
                        </telerikDocking:RadPane> 
                        <telerikDocking:RadPane x:Name="Case000003Pane" Header="CR000003" CanFloat="False" CanUserPin="True"
                            <TextBlock FontSize="18.667" Text="Case 000003" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center"/> 
                        </telerikDocking:RadPane> 
                        <telerikDocking:RadPane x:Name="Case000004Pane" Header="CR000004" CanFloat="False" CanUserPin="True"
                            <TextBlock FontSize="18.667" Text="Case 000004" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center"/> 
                        </telerikDocking:RadPane> 
                    </telerikDocking:RadPaneGroup> 
                </telerikDocking:RadSplitContainer> 
            </telerikDocking:RadDocking.DocumentHost> 
        </telerikDocking:RadDocking> 
    </DockPanel> 
</Window> 

Kalin
Telerik team
 answered on 04 Apr 2014
2 answers
430 views
Code:

<UserControl.Resources>
<ResourceDictionary>
<ControlTemplate x:Key="RadTreeViewItemControlTemplate1" TargetType="{x:Type telerik:RadTreeViewItem}">
<Grid x:Name="RootElement">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid x:Name="HeaderRow" Background="Transparent" MinHeight="{TemplateBinding MinHeight}" SnapsToDevicePixels="True">
<Border x:Name="SelectionUnfocusedVisual" BorderBrush="#FFDBDBDB" BorderThickness="1" Grid.ColumnSpan="6" Grid.Column="2" CornerRadius="1" Visibility="Collapsed">
<Border BorderBrush="Transparent" BorderThickness="1" CornerRadius="0">
<Border.Background>
<LinearGradientBrush EndPoint="0,1">
<GradientStop Color="#FFF8F6F9" Offset="0"/>
<GradientStop Color="#FFF0F0F0" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</Border>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="True"/>
<Condition Property="IsSelectionActive" Value="False"/>
</MultiTrigger.Conditions>
<Setter Property="Visibility" TargetName="SelectionUnfocusedVisual" Value="Visible"/>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ResourceDictionary>
</UserControl.Resources>


<DockPanel>
<telerik:RadDocking x:Name="radDocking" Width="245" ConstraintAutoHideArea="False">
<telerik:RadSplitContainer x:Name="radSplitContainer">
<telerik:RadPaneGroup x:Name="radGroup">
<telerik:RadPane x:Name="radPane1" Header="Test" ContextMenuTemplate="{x:Null}" CanUserClose="False" CanFloat="False" Cursor="Hand">
<Grid>
<DockPanel LastChildFill="True">
<telerik:RadTreeView x:Name="radTreeView" DockPanel.Dock="Left" Background="#FF525152" VirtualizingPanel.IsVirtualizing="True">
<telerik:RadTreeView.Resources>
<Style TargetType="{x:Type telerik:RadTreeViewItem}">
<Setter Property="Template" Value="{StaticResource RadTreeViewItemControlTemplate1}" />
</Style>
</telerik:RadTreeView.Resources>
</telerik:RadTreeView>
</DockPanel>
</Grid>
</telerik:RadPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
</telerik:RadDocking>
</DockPanel>A

After using the Radpane, the selected item is not having the style applied. If RadTreeView alone is used (without having radpane), the selected item in the radtreeview is having the style SelectionUnfocusedVisual which is working properly (i.e), Selected Item gets Highlighted. How to make the selected item in the radtreeview to have a style applied (or) to highlight the radtreeview selected item when a radpane is used?. Thanks.
John
Top achievements
Rank 1
 answered on 04 Apr 2014
2 answers
341 views
I posted a thread two days ago about a problem I was having with e.Handled in a RadDocking.Close event.  After looking at the code, I moved the logic to the PreviewClose event; however the result is the same.  I am attempting to close all the panes in a RadPaneGroup inside the DocumentHost.   I have tried...
  • RadPaneGroup.HideAllPanes(), but the panes remain visible.  After the call I can close all but the first pane indiviually using the close button on each tab.  If I drag the last remaining pane off the tabstrip it disappears.
  • Any direct manipulation of the RadPaneGroup.Items, whether a call to Clear(), Remove(pane), RemoveAt(index) causes an n "Object reference not set to an instance of an object." exception after exiting the handler with e.Handled set to true.
    • at Telerik.Windows.Controls.RadPane.Close() in c:\TB\105WPF_Scrum\Current_HotFix\Sources\Controls\Docking\Docking\Docking\RadPane.cs:line 1360
         at Telerik.Windows.Controls.RadPane.OnIsHiddenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\Docking\Docking\Docking\RadPane.cs:line 1186
  • I tried looping through the Items and using RemoveFromParent() but that causes an "Object reference not set to an instance of an object." exception when attempting to remove the second pane.
    • at Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__7(UIElement item) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\TabControl\TabStripPanel.cs:line 176
      at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
      at System.Linq.Enumerable.Max(IEnumerable`1 source)
      at Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__6(Double total, List`1 next) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\TabControl\TabStripPanel.cs:line 174
      at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
      at Telerik.Windows.Controls.Primitives.TabStripPanel.MeasureOverride(Size availableSize) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\TabControl\TabStripPanel.cs:line 171
      at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
      at System.Windows.UIElement.Measure(Size availableSize)
      at System.Windows.ContextLayoutManager.UpdateLayout()
      at Telerik.Windows.Controls.RadPane.OnDocumentHostTemplateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\Docking\Docking\Docking\RadPane.cs:line 1223
  • I tried removing all but the pane passed in the event args and leaving e.Handle false, hoping Close would take care of it, but that causes an "Object reference not set to an instance of an object." exception like the previous example.
    •    at Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__7(UIElement item) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\TabControl\TabStripPanel.cs:line 176
         at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
         at System.Linq.Enumerable.Max(IEnumerable`1 source)
         at Telerik.Windows.Controls.Primitives.TabStripPanel.<>c__DisplayClass14.<MeasureOverride>b__6(Double total, List`1 next) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\TabControl\TabStripPanel.cs:line 174
         at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
         at Telerik.Windows.Controls.Primitives.TabStripPanel.MeasureOverride(Size availableSize) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\TabControl\TabStripPanel.cs:line 171
         at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
         at System.Windows.UIElement.Measure(Size availableSize)
         at System.Windows.ContextLayoutManager.UpdateLayout()
         at Telerik.Windows.Controls.RadPane.OnDocumentHostTemplateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\TB\105\WPF_Scrum\Current_HotFix\Sources\Controls\Docking\Docking\Docking\RadPane.cs:line 1223

All of this happens in 2012.2.620 and did not happen in 2012.2.607.  Please let me know if there is a way to achieve this functionality without having to revert to using the previous version.

Thanks in advance, Steve

Charles
Top achievements
Rank 1
 answered on 04 Apr 2014
8 answers
1.1K+ views
I have rad windows ,one of them is mainwindow  ,another of them is show dialog window  and  i have problem about, for example .both of them opened and  when i would open different program after that  trying to open again this program window of show dialog  stay back side  and i  and i cant be usefull for me  in a result i want show dialog window is top of main window also i tried to use  named BringIntoView and BringIntofront methods but they didnt work. i need your helps. maybe you can send sample about it to me,
Kalin
Telerik team
 answered on 04 Apr 2014
2 answers
70 views
Hello,

I already implemented some drag and drop behaviors in my application. To do so, I create a DragVisual in the OnDragInitialize event (registered via DragDropManager.AddDragInitializeHandler), and I give it a DataContext (a Content actually) and a ContentTemplate. Then I can have a nice preview of the data being dragged that I can template as I wish and that will follow the mouse cursor.
This work perfectly when I'm dragging data from my app, to my app.

Now I am willing to be able to drag files, from the windows explorer, to a specific control of my application. I would like to create a DragVisual in the same way, when the mouse cursor enters one of the windows of my application (and destroy it if the mouse cursor leaves the window, but this is another problem).

The problem is that when the drag starts from another application, OnDragInitialize is not invoked (which makes perfectly sense). But how can I achieve to create a DragVisual in this context? None of the other drag'n'drop-related events have a DragVisual in their EventArgs.

Thanks
Administrator
Telerik team
 answered on 04 Apr 2014
1 answer
226 views
Hi,

i'm looking for a RadDiagramToolbox xaml example, Shapes, Container,.. should be filled in xaml not codebehind...

<telerik:RadDiagramToolbox x:Name="toolbox" Grid.Column="0" Title="GALLERY" Width="220" HorizontalAlignment="Right" Grid.RowSpan="2"
                                       Header="{Binding SelectedItem.Header, RelativeSource={RelativeSource Self}}"
                                       Visibility="{Binding IsChecked, ElementName=toolboxButton, Converter={StaticResource BooleanToVisibilityConverter}}">               
<extensions:RadDiagramToolbox.HeaderBackground>
         <SolidColorBrush Color="#FF009494" telerik:Windows8Colors.Color="BoundColor" telerik:Windows8Palette.IsFreezable="True"/>
        </extensions:RadDiagramToolbox.HeaderBackground>
        ... ITEMS .... ??????????????????
</telerik:RadDiagramToolbox>

Thanks a lot
Best Regards
Rene
Pavel R. Pavlov
Telerik team
 answered on 04 Apr 2014
1 answer
174 views
Hi,

we crearte the Shapes like this:

MyGallery secondGallery = new MyGallery { Header = "Shapes" };
secondGallery.Shapes.Add(new Switch
{
         SN = "222",
         Content = "Start",
         Height = 80,
         Width = 80,
         Backcolor = "#009494",
         Forecolor = "#ffffff",
         Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.EllipseShape),
         Manufacturer = "Manufacturer 2.2"
});

then we bin the Shapes to the toolbox

<!--  ToolboxItemTemplate  -->
<DataTemplate x:Key="ToolboxItemTemplate1">
   <Border Width="130"
                   Height="80"
                   Margin="0 1 1 0"
                   Background="Transparent">
          <Grid>
              <Grid.RowDefinitions>
                 <RowDefinition Height="*" />                           
             </Grid.RowDefinitions>
             <Viewbox Grid.Row="0" Width="{Binding Width}" Height="{Binding Height}" Margin="5 10 5 0"   HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill">
                  <telerik:RadDiagramShape Margin="15" VerticalAlignment="Top" HorizontalContentAlignment="Center"               VerticalContentAlignment="Center" FontWeight="Bold"
                                                     Geometry="{Binding Geometry}" IsHitTestVisible="False" Content="{Binding Content}" FontSize="15" Foreground="{Binding Forecolor}"
                                                     Background="{Binding Backcolor}">   
               </telerik:RadDiagramShape>
           </Viewbox>                      
       </Grid>               
    </Border>           
</DataTemplate>
 
<!--  ToolboxGroupTemplate  -->
<HierarchicalDataTemplate x:Key="ToolboxGroupTemplate1"
                            ItemsSource="{Binding Shapes}"
                            ItemTemplate="{StaticResource ToolboxItemTemplate1}">
     <TextBlock Text="{Binding Header}" FontSize="13" />
</HierarchicalDataTemplate>

For example we habe a simple RectangleShape. With a cutom Tab in EditMode we select a Employee and now we want to edit the RectangleShape. Is it possible to change the view of the RectangleShape during runtim, for example see attached files.

Thanks a lot
Best Regards
Rene
Pavel R. Pavlov
Telerik team
 answered on 04 Apr 2014
1 answer
120 views
I am trying to make it so my user can change the theme at runtime in my project. It works fine for most of the controls, however the TabControl as well as the MenuItems and Menus do not change. Is there something I am missing? I looked at the quickstart samples but I don't have that dll in my binaries folder. Is that intentional?
Jonah
Top achievements
Rank 1
 answered on 03 Apr 2014
2 answers
173 views
I have a RadPivotGrid setup as follows which gives the error stated in the title "The attachable property 'DataProvider' was not found in type 'RadPivotGrid'"
            <pivot:RadPivotGrid>
                <pivot:RadPivotGrid.DataProvider>
                    <pivot:LocalDataSourceProvider ItemsSource="{Binding Path=Events2}"/>
                </pivot:RadPivotGrid.DataProvider>
            </pivot:RadPivotGrid>

This is in Visual Studio 2013 Express with Telerik Q1 2014 WPF 4.5.

I also made sure I have the following references (and some extra):
Telerik.Pivot.Core
Telerik.Windows.Controls.Pivot
Telerik.Windows.Controls
System.Runtime.Serialization

It does compile but no interface is shown. Events is a list of standard objects with properties. If all works well should I assume that it just prints a flat grid with the above definition?
Wouter
Top achievements
Rank 1
 answered on 03 Apr 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
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
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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?