Telerik Forums
UI for WPF Forum
3 answers
344 views
Hello Telerik team

I am trying to style RadMenuItem for my WPF application. I am almost done but I am stuck in one critical part.

I am mostly making use of submenuHeader, so I styled the HighlightVisual to suit my needs (for example changed color to green)
The place that was affecting mentioned HighlightVisual was in the trigger Role of SubmenuHeader.

            <Trigger Property="Role"
                     Value="SubmenuHeader">
                           ...
           <Border x:Name="HighlightVisual"                                        
                                            BorderThickness="1"
                                            CornerRadius="1"
                                            Visibility="Collapsed"
                                            Background="Green" />     

In the same role (SubmenuHeader) I also changed the background of the popup (for example Yellow)
                     ...
     <Popup x:Name="PART_Popup"
                                       AllowsTransparency="True"
                                       Focusable="False"
                                       HorizontalOffset="1"
                                       IsOpen="{TemplateBinding IsSubmenuOpen}"
                                       VerticalOffset="-1" >                                  
                                    
                                    <Grid>    
                                        <Grid x:Name="PopupContentElement">                                        
                                            <Border BorderBrush="#FF848484"
                                                    BorderThickness="1"
                                                    Background="Yellow">

Now my problem is this : How do I change the Highlight color of the items in the popup ? I can see that there is an ItemsPresenter defined in the submenuHeader's popup that probably contains radMenuItems, with a default Highlight (border background) color of a yellow gradient but I don't know where this is coming from or is defined. I need to override this default color so my context menu is consistent. Any help would be appreciated.

Telerik version 2012.1.0402
Thanks in advance
Rosen Vladimirov
Telerik team
 answered on 01 Jul 2013
6 answers
219 views
Hello,

I'm using the ItemChanged event but when the user write a value in a filter, the event is not raised until the user press the enter key.
I need to know when the user change the filter value on property changed.
How can I handle this,

Thank you,

Benjamin
Benjamin
Top achievements
Rank 1
 answered on 29 Jun 2013
1 answer
188 views
Is it possible to have the RichTextBox use a canvas as the editing area?

I am trying to create an application where the user is putting text and images on a canvas.   They can then apply affects to the text.  It is basically so they can create templates to print on T-Shirts.  So the location of items has to be exact.

Is that possible?
Petya
Telerik team
 answered on 28 Jun 2013
4 answers
161 views
Hi there! 

I have a RadDiagram project that I'm currently working on and need a bit of advice on the best approach. Currently, I am listing out an ObservableCollection called CurrentExampleItems and binding it to an ItemsControl, and the DataTemplate is a UserControl of a CustomShape. I'd like to allow users to drag the UserControl from the StackPanel and have it drop on the grid, but to not create a copy. The idea being that there is only one of these ExampleItems that can be placed on the Grid, so if its on the grid, I dont want to show it in the StackPanel.

All examples I've played with our developed include the OnDragInitialize function to create a duplicate object based on the source, but I think I'd have to do something slightly different to enable this.

Any thoughts?


<StackPanel Background="White" x:Name="stackExampleItems" Orientation="Vertical" telerik:DragDropManager.AllowCapturedDrag="True" >
                    <ItemsControl ItemsSource="{Binding CurrentExampleItems}" >
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <local:ExampleItemView DataContext="{Binding }"   />
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </StackPanel>
Miro Miroslavov
Telerik team
 answered on 28 Jun 2013
5 answers
349 views
In the right-bottom corner of the RibbonView's Backstage there is an (office) image.
How could we change the image?
For us it's not important that the image changes when using different themes.
Kiril Vandov
Telerik team
 answered on 28 Jun 2013
1 answer
106 views
HI,
I have a all those3 controls in my form. Howerver, if the datapager page size is 10 and the gridview have more than 10 rows when i click add new in the data form it show a blank page. if gridview row has lees than the datapager size or I remove the datapager then it works fine.
Is there something I miss or this is a bug?
Thanks,
Ivan Ivanov
Telerik team
 answered on 28 Jun 2013
1 answer
88 views

Hi,

I have a situation where I have successfully shown data in a ParentGrid, but now I have setup a child grid but cant get it to display data.

XAML:

 <telerik:RadGridView Name="CustomersGrid" ShowInsertRow="True" Grid.Column="0" SelectionChanged="CustomersGrid_SelectionChanged">
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition/>
            </telerik:RadGridView.ChildTableDefinitions>            
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView Name="ChildGrid" ShowInsertRow="True" Loaded="ChildGrid_Loaded" />
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>


C#:

 public MainWindow()
        {
            InitializeComponent();
            var customers = Repo.GetCustomers();
            CustomersGrid.RowIsExpandedChanging += CustomersGrid_RowIsExpandedChanging;
            CustomersGrid.ItemsSource = customers;
            
            DataContext = this;
        }

This works fine and shows the child grid when clicking on the + sign. The ParentGrid is bound to Customers (Select * FROM Customers) I need to know how to bind the child grids to Agreements (Select * From Agreements where CUST_NO = '" + CUST_NO + "'"). I cant seem to access the Child Grid's itemsource to set the data binding.

What am I doing wrong?

Thank you very much!
Ron
Ivan Ivanov
Telerik team
 answered on 28 Jun 2013
3 answers
175 views
Hello,
I am applying filtering to a column in the treelist but upon filtering, only the top level rows are kept.Rows in the final results cannot be expanded or collapse. I would like to display all the children rows for the filtered data. How can I achieve this?
Thanks
Dimitrina
Telerik team
 answered on 28 Jun 2013
0 answers
201 views
Hi,

I like to get the current item in a drag & drop operation.
It´s shared code from silverlight and there it´s possible to get the current item with the following code:

private System.Windows.Controls.ListBoxItem GetItemFromPoint(FrameworkElement listBox, Point CurrentPoint)
{
  var p = listBox.TransformToVisual(App.Center.RootVisual).Transform(CurrentPoint);
  IEnumerable hits = VisualTreeHelper.FindElementsInHostCoordinates(p, listBox);
  System.Windows.Controls.ListBoxItem item = null;
 
  foreach (UIElement element in hits)
  {
    if (element is System.Windows.Controls.ListBoxItem)
    {
      item = (System.Windows.Controls.ListBoxItem)element;
      break;
    }
  }
 
  return item;
}

But now I´m using WPF and the RadListBox. The return type now is a RadListBoxItem and the parameter listBox is a RadListBox control.

Which opportunities do I have with the RadListBox in WPF?

Thanks
Mirko
Top achievements
Rank 1
 asked on 28 Jun 2013
5 answers
380 views
<telerik:RadNumericUpDown Value="{Binding DaysNumber}" Minimum="1" IsInteger="True" VerticalAlignment="Center" Margin="5" Maximum="999">
    <telerik:RadNumericUpDown.NumberFormatInfo>
        <globalization:NumberFormatInfo NumberGroupSeparator="" NumberDecimalSeparator="." />
    </telerik:RadNumericUpDown.NumberFormatInfo>
</telerik:RadNumericUpDown>

NumericUpDown control allows to enter commas (the screenshot is  attached). How can I forbid that?
Koen
Top achievements
Rank 1
 answered on 28 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?