Telerik Forums
UI for WPF Forum
5 answers
213 views
I found this nice example on https://github.com/telerik/xaml-sdk about creating a Column Chooser for the GridView. However in my scenario I'm creating a GridView via custom control and I want to create the Column Chooser via RadWindow. I am unfortuantely unable to bind the Listbox ItemSource to the Columns property of the grid, am I missing something?
Below is my code to better explain:


Xaml:
<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        Title="MainWindow">
<Window.Resources>
        <DataTemplate x:Key="RadMenuContentTemplate">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="100" />
                </Grid.RowDefinitions>
                <TextBlock Text="Available columns:" />
                <ListBox Grid.Row="1" ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerik:RadGridView}, Path=Columns}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <CheckBox Content="{Binding Header}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Grid>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <telerik:RadGridView x:Name="RadGridView1" ItemsSource="{Binding View}" Grid.Row="1" ShowGroupPanel="False" />
    </Grid>
</Window>

Code-Behind:

public partial class MainWindow : Window
    {
        private readonly RadContextMenu defaultContextMenu = new RadContextMenu();

        public MainWindow()
        {
            InitializeComponent();
            var filterMenuItem = new RadMenuItem { Header = "Show/Hide Columns" };
            filterMenuItem.Click += this.FilterMenuItemClick;
            this.defaultContextMenu.Items.Add(filterMenuItem);
            RadContextMenu.SetContextMenu(this.RadGridView1, this.defaultContextMenu);
            
            DataContext = new MyDataContext();
        }

        private void FilterMenuItemClick(object sender, Telerik.Windows.RadRoutedEventArgs e)
        {
            var radWindow = new RadWindow
            {
                ContentTemplate = this.Resources["RadMenuContentTemplate"] as DataTemplate,
                CanClose = true,
                CanMove = false,
                ResizeMode = ResizeMode.NoResize,
                WindowStartupLocation = WindowStartupLocation.CenterScreen,
                HideMinimizeButton = true,
                HideMaximizeButton = true,
                MinHeight = 100
            };
            radWindow.ShowDialog();
        }
    }

Dongzhi
Top achievements
Rank 1
 answered on 23 Oct 2014
1 answer
178 views
I need to implement a radribbon view as MDI window.How can we set up a radribbon view as a MDI 
Martin Ivanov
Telerik team
 answered on 23 Oct 2014
1 answer
173 views
Hi Team,
Could you please clarify whether the below scenario is by Design / an issue

"Track Changes" is on by default, when Application is ready

Step 1) User aa logged in to Application and entered text :
        "This is a sample paragraph to verify with more users"

Step 2) User bb logged in to Application and entered text :
        "second bb"

Step 3) User bb deletes the words "with more users" (which is entered by User aa)
Now this delete operation is not marked with "Track Changes"

"Step 1 User aa.png"
"Step 2 User bb.png"
"Step 3 User bb.png"
Petya
Telerik team
 answered on 23 Oct 2014
8 answers
311 views
I've followed the tutorial on getting themes running. I have added the merged resource library to App.xaml and I can even apply themes listed in the theme files to my controls....but nothing happens.

For example, I have quite a few buttons and I do not have them themed, so according to the docs adding the merged resource library should start theming my buttons but it does not.

I went to an individual button and explicitly set the theme to the button style in the them file, and intellisence detected the them was there and everything but still no theme is applied. 

I do get the following error by all brush properties:

Object of type 'Telerik.Windows.Controls.VisualStudio2013ResourceKey' cannot be converted to type 'Telerik.Windows.Controls.VisualStudio2013ResourceKey'.

Maybe something didn't install properly? I've looked all over for those resources and I can't find them. 

Thanks!
Eric

Vanya Pavlova
Telerik team
 answered on 23 Oct 2014
1 answer
235 views
The content size becomes too small in the RadButton when I use Office2013 theme. (Telerik WPF library version 2014.2.729.45)
The content of the RadButton is an image by DrawingBrush (Please refer to following code snippet.),
the image is shown nicely with any themes except for Office2013.

<telerik:RadButton.Content>
 <Rectangle>
  <Rectangle.Fill>
   <DrawingBrush Stretch="Uniform">
    <DrawingBrush.Drawing>
     <GeometryDrawing Brush="Transparent" Geometry="M 25,121L 249,121L ...">
      <GeometryDrawing.Pen>
       <Pen Thickness="50" LineJoin="Round" Brush="Black"/>
      </GeometryDrawing.Pen>
     </GeometryDrawing>
    </DrawingBrush.Drawing>
   </DrawingBrush>
  </Rectangle.Fill>
 </Rectangle>
</telerik:RadButton.Content>

When I checked out with the Snoop tool, I learned the ContentPresenter Margin of the RadButton is a little big so the image was pushed in then it became small.
I explicitly set the height and width of the Rectagle to fix the image size though, the image was chopped out because the area was not large enough to display the whole image.

So is there a way to keep the image size consistent when Office2013 theme is selected?

Thanks...

Milena
Telerik team
 answered on 23 Oct 2014
3 answers
119 views
Hello,

I have a hierarchical radgridview and I would like to be able to copy / paste data from the grid to an excel spreadsheet either from the parent grid either from the child grid.
I use the rowdetailstemplate to load a view containing the child grid. The copy works for the parent grid, but selection is off and copy just does not work for the second grid.

Parent :
 
<telerik:RadGridView  x:Name="RadGridView1"    
                              Grid.Row="2"
                              ItemsSource="{Binding ResultsViewModelList}" AutoGenerateColumns="False"
                              custom:GridViewDataColumnsBehavior.BindableColumns="{Binding ColumnCollection}"
                              SelectionMode="Extended"
                              ScrollViewer.VerticalScrollBarVisibility="Visible"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ColumnWidth="150" GroupRenderMode="Flat"
                              EnableColumnVirtualization="False"
                              ClipboardCopyMode="All"
                              >
            <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate >
                    <vw:ResultView DataContext="{Binding}"/>
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>
        </telerik:RadGridView>

child:

<telerik:RadGridView Name="radGridView1" AutoGenerateColumns="True"   ItemsSource="{Binding Path=ItemsList}"
                          ColumnWidth="150" GroupRenderMode="Flat" EnableColumnVirtualization="False" EnableRowVirtualization="False"
                          ClipboardCopyMode="All" SelectionMode="Multiple" SelectionUnit="FullRow">
     </telerik:RadGridView>

Loic
Top achievements
Rank 1
 answered on 23 Oct 2014
5 answers
188 views
Hi,

I'm using Telerik V2012.2.912.35 on a Windows 7 OS and when I minimized my RadWindow to my taskbar, if I bring my mouse over the application on the taskbar I see a small window representing my RadWindow, If I click on the little red X in the upper right corner my application crash.

Here is the code I use to create an instance and display my RadWindow:

mSignatureFormOpened = new SignatureForm();
mSignatureFormOpened.ShowDialog();

When I close it, I have to following exception but when the WindowState is normal or maximized everything are fine:

System.InvalidOperationException was unhandled by user code
  Message="Impossible de définir Visibility à Visible ou d'appeler Show, ShowDialog ou Close lorsque la fenêtre est en cours de fermeture."
  Source="PresentationFramework"
  StackTrace:
       à System.Windows.Window.VerifyNotClosing()
       à System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
       à System.Windows.Window.Close()
       à Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Close() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\WindowWithNoChromeWindowHost.cs:ligne 60
       à Telerik.Windows.Controls.WindowBase.CloseHostImidiately() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1229
       à Telerik.Windows.Controls.WindowBase.OnCloseAnimationFinished() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1071
       à Telerik.Windows.Controls.WindowBase.PlayCloseAnimation() dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1017
       à Telerik.Windows.Controls.WindowBase.TryClose(Boolean shouldCloseHost) dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 652
       à Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IWindowDragAware.TryClose(Boolean shouldCloseHost) dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 1257
       à Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.OnWindowClosing(Object sender, CancelEventArgs e) dans c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\WindowWithNoChromeWindowHost.cs:ligne 251
       à System.Windows.Window.OnClosing(CancelEventArgs e)
       à System.Windows.Window.WmClose()
  InnerException:



Thank's
Alain
Kalin
Telerik team
 answered on 22 Oct 2014
4 answers
233 views
Hi Team,
I have a grid view with a Radio button to select the row. I select a row, but when i scroll down and again come to original position(to the selected row), the selection get deselected, and sometimes some other row get selected.
How can we handle such problem.

Also, If I had some rowdetails in a grid, and fetch data from the database when row details visibility change, to populate the row details. This creates problem when row virtualization is enabled. There were many validation handeled to track the data change in row detail visibility change event, which get fired when we scroll and when we come to original position again, data does not get populated and my changes are lost.

Please let me know how to overcome such scenarios, when we enable row virtualization.

Thanks.
Mladen
Top achievements
Rank 1
 answered on 22 Oct 2014
7 answers
329 views

Hi,

I am using Telerik "RadDocking" control in our WPF project. I customized the "TitleTemplate" of one RadPane inside using the following DataTemplate. It basically added a RadComboBox and a RadButton besides the title. Now, whenever I pin/unpin the group pane by clicking that "Pin" button, the "SelectionChanged" event in that RadComboBox also gets fired, which is not expected since the selection is not changed in the combobox. Can you explain why this happened? Is this a bug in the control? Thanks, Jie

<

 

 

DataTemplate x:Key="WellTreeTitleTemplate">

 

 

 

 

<Grid>

 

 

 

 

<Grid.ColumnDefinitions>

 

 

 

 

<ColumnDefinition Width="Auto"/>

 

 

 

 

<ColumnDefinition Width="*"/>

 

 

 

 

<ColumnDefinition Width="Auto"/>

 

 

 

 

</Grid.ColumnDefinitions>

 

 

 

 

<ContentPresenter Grid.Column="0" Content="{Binding}" VerticalAlignment="Center" />

 

 

 

 

<tk:RadComboBox Grid.Column="1" Margin="5,4,2,4" HorizontalAlignment="Stretch"

 

 

 

DisplayMemberPath="Name" IsEditable="True" IsReadOnly="True"

 

 

 

ItemsSource="{Binding Path=DataContext.Trees, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"

 

 

 

SelectedItem="{Binding Path=DataContext.SelectedTree, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Mode=TwoWay}"

 

 

 

SelectionChanged="treeComboBox_SelectionChanged" />

 

 

 

 

<tk:RadButton Grid.Column="2" ToolTip="Tree Setup" IsBackgroundVisible="False"

 

 

 

Margin="0,1,5,1" Width="22" Height="22" Click="treeSetupButton_Click">

 

 

 

 

<Image Source="{DynamicResource ImageWellTreeConfig24}" />

 

 

 

 

</tk:RadButton>

 

 

 

 

</Grid>

 

 

 

 

</DataTemplate>

 

Kalin
Telerik team
 answered on 21 Oct 2014
7 answers
227 views
I am using RadDocking and trying to implement keyboard tab order, I have a Document host and RadPaneGroup that is inside a RadSplitContainer.
I am printing out the control which gets the keyboard focus when i tab around, below is the list of controls that get focus, I am able to figure out RadPaneGroup, Header and i have set IsTabStop = false for them and they stopped showing up but I am not sure how to skip this:
Telerik.Windows.Controls.Docking.AutoHideArea


Logical focus: Telerik.Windows.Controls.RadDocking Items.Count:1
Keyboard focus: Telerik.Windows.Controls.RadDocking Items.Count:1
Logical focus: Telerik.Windows.Controls.Docking.AutoHideArea Items.Count:0
Keyboard focus: Telerik.Windows.Controls.Docking.AutoHideArea Items.Count:0
Logical focus: Telerik.Windows.Controls.Docking.AutoHideArea Items.Count:0
Keyboard focus: Telerik.Windows.Controls.Docking.AutoHideArea Items.Count:0
Logical focus: Telerik.Windows.Controls.Docking.AutoHideArea Items.Count:0
Keyboard focus: Telerik.Windows.Controls.Docking.AutoHideArea Items.Count:0
Logical focus: Telerik.Windows.Controls.Docking.AutoHideArea Items.Count:0
Keyboard focus: Telerik.Windows.Controls.Docking.AutoHideArea Items.Count:0
Logical focus: Telerik.Windows.Controls.RadPaneGroup Items.Count:1
Keyboard focus: Telerik.Windows.Controls.RadPaneGroup Items.Count:1
Logical focus: System.Windows.Controls.ContentControl
Keyboard focus: System.Windows.Controls.ContentControl
Logical focus: Telerik.Windows.Controls.Docking.PaneHeader
Keyboard focus: Telerik.Windows.Controls.Docking.PaneHeader

When i tab around the window I get 4 
Vladi
Telerik team
 answered on 21 Oct 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
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?