Telerik Forums
UI for WPF Forum
4 answers
129 views
Hi,

I haven't attempted this yet but, do you have any advice on the best way to highlight any text that is NOT contained within Custom Annotations?

i.e. what do you think is the most efficient check process to find and highlight all text not contained within annotations?

Thanks for your time, any advice is appreciated,

Rob 
Iva Toteva
Telerik team
 answered on 31 Aug 2012
0 answers
84 views
How Find Child controls in RadGridView once code behind class contructor executed InitializeComponent() method.
 
When I wanted to find Child controls in the RadGridView it returns null. I came to know that once I click on any button then I can find the child controls of the RadGridView but my requirement is find child controls after InitializeComponent() method executed and update their values as per business rules.

Please help me
Laxman

Laxman
Top achievements
Rank 1
 asked on 31 Aug 2012
0 answers
147 views

So I have a dynamic RadGridView using MVVM and Caliburn Micro. This means that I add Columns programmatically to the control. basically like this:

for (int i = 0; i < length; i++)
{
    Binding b = new Binding(string.Format("Collection[{0}].ValueIWant", i));
    binding.StringFormat = "{0:0.##}";
    GridViewDataColumn column = new GridViewDataColumn()
    {
        Header = HeaderFor(i),
        DataMemberBinding = b,
        DataType = typeof(double?)
    };

    Control.columns.Add(column);
}

Now I need to add new lines that show the percentage between line 1 and 22 and 3 and so on.

I've managed to do that but I'm not sure how I would manage to change the String.format specifically for those cells instead of the whole column.

CellTemplateSelector came to mind but I'm not sure that is a good idea as this might mean I have to set the binding again, not knowing the value of i and such. Also I only want to change the string.format on the binding.

As I'm manipulating the number as a double (0,5 is 50%, 50 is 5000%) I guess I have to mask the input as well. not sure if String.Format does that for me as well or if I should use RadMaskedInput

Ingólfur
Top achievements
Rank 1
 asked on 31 Aug 2012
6 answers
639 views
I am having a problem displaying the context menu RadContextMenu with Icon, I am using dynamic binding to observable collection, which contains context menu items (Text and Icon), I am following this tutorial "Dynamic Binding", following is my XAML.

<Style x:Key="MenuItemStyle" TargetType="{x:Type telerik:RadMenuItem}">
                <Setter Property="Icon">
                    <Setter.Value>
                        <Image Source="{Binding IconPath, Converter={StaticResource pathtoimage}}" />
                    </Setter.Value>
                </Setter>
            </Style>
 
            <HierarchicalDataTemplate x:Key="MenuItemTemplate">
                <telerik:RadButton Content="{Binding Title}" HorizontalContentAlignment="Left" Background="Transparent" BorderBrush="Transparent" />
            </HierarchicalDataTemplate>

and following is the XAML of RadGridView, on which context menu is placed.

<telerik:RadGridView x:Name="myGridView" AutoGenerateColumns="False" ItemsSource="{Binding GridData}" VerticalAlignment="Top">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Result}" Header="Result"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Category}" Header="Category"/>
            </telerik:RadGridView.Columns>
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu ItemsSource="{Binding ContextMenuItems}" ItemContainerStyle="{StaticResource MenuItemStyle}" ItemTemplate="{StaticResource MenuItemTemplate}">                 
                </telerik:RadContextMenu>

View Model is as follows
class MainViewModel
    {
        private ObservableCollection<MenuItemObj> menuitems_;
        public ObservableCollection<MenuItemObj> ContextMenuItems
        {
            get
            {
                return menuitems_;
            }
            set
            {
                menuitems_ = value;
            }
        }
 
        private ObservableCollection<GridRowDataObj> griddata_;
        public ObservableCollection<GridRowDataObj> GridData
        {
            get
            {
                return griddata_;
            }
            set
            {
                griddata_ = value;
            }
        }
    }
 
    public class MenuItemObj
    {
        public string Title { get; set; }
        public string IconPath { get; set; }
    }
 
    public class GridRowDataObj
    {
        public string Result { set; get; }
        public string Category { set; get; }
    }

and setting DataContext as

//TODO
            ObservableCollection<GridRowDataObj> gd = new ObservableCollection<GridRowDataObj>();
            gd.Add(new GridRowDataObj() { Result = "Matric", Category = "SSC" });
            gd.Add(new GridRowDataObj() { Result = "FSc", Category = "HSSC" });
            gd.Add(new GridRowDataObj() { Result = "FA", Category = "HSSC" });
 
            //TODO
            ObservableCollection<MenuItemObj> mi = new ObservableCollection<MenuItemObj>();
            mi.Add(new MenuItemObj() { Title = "My Item 1", IconPath = "/Images/item1.png" });
            mi.Add(new MenuItemObj() { Title = "My Item 2", IconPath = "/Images/item2.png" });
            mi.Add(new MenuItemObj() { Title = "My Item 3", IconPath = "/Images/item3.png" });
 
            MainViewModel mvm = new MainViewModel();
            mvm.ContextMenuItems = mi;
            mvm.GridData = gd;
 
            this.DataContext = mvm;

What I am getting is like this as in attached file "Menu_Image.png"

I am not sure why the icons for first and second menu items are not displayed, I have checked that the icon is displayed for last menu item only. I have complete project replicating this scenario, I can send you if required, Please help me out?



Muhammad Ummar
Top achievements
Rank 1
 answered on 31 Aug 2012
1 answer
74 views
How   to  label   data  with  "radmap"???

Quetion  one:
     How   to  use  a  pins   which   has  a  tag   to    mark   information???


Quetion  two:

     How   to  mark   the    "Energy  consumption   data"    and    "Water    consumption   data"   on  every  building  of  the  map???   
     Such  as  the  picture  attechment...

    The  picture... 
Andrey
Telerik team
 answered on 31 Aug 2012
0 answers
77 views
I have tried to add in Xaml name, x:name, UniqueName but all do not show up in runtime when i check in the code-behind for the combobox control.

How could I locate the combobox without a name in a switch case scenario?
Neogeo
Top achievements
Rank 1
 asked on 31 Aug 2012
5 answers
107 views
Hi,



We wanted to implement Rad Control Assembly protection in our WPF  application we are developing.

Following the documentation as per the below link



http://www.telerik.com/help/wpf/protecting-telerik-radcontrols-assembly.html



Where can I find the Source code for Rad Controls (WPF) with BUILD instructions.

We are currently using 2012 Q1 release and having plans to upgrade.



Could you kindly provide the Source Code with BUILD instructions for Rad Control Assembly protection or provide me with the resources / Iinks I can refer to and download.



Kindly suggest.



Thank you & Regards,

Phani. 

Phani Kumar
Top achievements
Rank 1
 answered on 30 Aug 2012
2 answers
57 views
Can we use RadTreeView in a root item?

Ex:
---------------------------------------
RootNode1   ( RadPanelBarItem.Header ) <-- Root Item 1
--------------------------------------- 
+ Level1             (RadTreeView)
|---- Level2
.......
---------------------------------------
RootNode2   ( RadPanelBarItem.Header ) <-- Root Item 2 
--------------------------------------- 
+ Level1             (RadTreeView)
|---- Level2
.......

BTW: We are using MVVM, the hierarchical data updates dynamically. 

Thanks.
Chris
Top achievements
Rank 1
 answered on 30 Aug 2012
3 answers
289 views
If the data like below:

RootNode1
- Level1
-- Level2
--- Level3

and I would like to provide a check box to hide Level1 or Level2
Ex: Hide Level1 the output should be 

RootNode1
- Level2
-- Level3  

Ex: Hide Level2 the output should be 

RootNode1
- Level1
-- Level3

Ex: Hide both Level1 and Level2 the output should be 

RootNode1
- Level3


Is possible to do it with RadTreeView?

BTW: we are using RadControl for WPF 2012.2.0725, and the each level in the tree is an ObservableCollection list, and we use converter to convert each list into ListCollectionView to handle sorting and filtering ( http://www.zagstudio.com/blog/434#.UDz-sNaPXng ).


Thanks.

 


Chris
Top achievements
Rank 1
 answered on 30 Aug 2012
1 answer
127 views
Hi,

I have a problem to change th font size of the radpanegroup header when using the metro them.  I have already tried this code :

First :
<telerik:RadPaneGroup FontSize="26" >
<telerik:RadPane x:Name="_outputControl" CanUserClose="True" Header="Output" >
   <ContentControl Grid.Row="0" regions:RegionManager.RegionName="OutputRegion" />                     
</telerik:RadPane>                 
</telerik:RadPaneGroup>


Second :
<Window.Resources>         
<Style x:key="headerStyle" TargetType="telerik:RadPaneGroup" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:MetroTheme, ElementType=telerik:RadPaneGroup}}">             
<Setter Property="FontSize" Value="26"/>         
</Style>    
</Window.Resources>
<telerik:RadPaneGroup  Style="{StaticResource headerStyle}">                     
<telerik:RadPane x:Name="_outputControl" CanUserClose="True" Header="Output" >                         
<ContentControl Grid.Row="0" regions:RegionManager.RegionName="OutputRegion" />                     
</telerik:RadPane>                 
</telerik:RadPaneGroup>
Nothing work, Is there a way to change the font size?

Regards.
Masha
Telerik team
 answered on 30 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?