Telerik Forums
UI for WPF Forum
5 answers
111 views
Hello, I have two issues on PropertyGrid in WPF 2013.2.611.40.
First, I tested several kinds of type converters but only the basic type converter seems to work.
Converters in the code below don't work except for ConvertTo.


    private string _name;
    [TypeConverter(typeof(Tuple3iConverter))]
    public string Name
    {
        get { return _name; }
        set { _name = value; }
    }

    public class Tuple3iConverter : TypeConverter
    {
        public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
        {
            if (context == null)
            {
                return false;
            }
            return ((sourceType == typeof(string)) || base.CanConvertFrom(context, sourceType));
        }
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            if (value is string)
            {
                return value;
            }
            return base.ConvertFrom(context, culture, value);
        }

        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (destinationType == typeof(string))
            {
                if (value.Equals("New"))
                    return "lsw822Man";
                else
                    return "NewMan";
            }
            return base.ConvertTo(context, culture, value, destinationType);
        }

        public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            List<string> genericList = new List<string>();

            genericList.Add("lsw822");
            genericList.Add("lsw833");
            genericList.Add("lsw844");

            return new TypeConverter.StandardValuesCollection(genericList);
        }

        public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
        {
            return true;
        }
    }

+

Second, when I resize the label columns and move the resizer to the leftmost position, each row stops in a different location.
I'm using Windows8Theme and this happens when using Windows8Theme. Please see the images attached.
Thanks!

Stefan
Telerik team
 answered on 02 Oct 2017
9 answers
113 views

Hello,

Upon application launch I want a RadPane to be maximized.

The user will not be able to change that status of this pane. It will be always maximized. 

Later on, other panes will be programmatically displayed.  

The user will be able to drag those panes, make them float but will not be able to maximize them.

Attached a xaml fragment I'm currently using.

Thank you,

Zvika 

Zvi
Top achievements
Rank 1
 answered on 29 Sep 2017
2 answers
116 views

Hi,

Wondering if there's a way to override the default error message, "Error" when args.IsParsingSuccessful is set to false in the ParseDateTimeValue event handler. Would like to provide something more descriptive to my users.

Thanks

Wilfred
Top achievements
Rank 1
 answered on 29 Sep 2017
2 answers
111 views

Hello,

Is there a way to customize the shape of each connector?  For example the rectangle has four outer connectors, can I make one an arrow point up and another connector for that same shape a connector with an arrow pointing down.  I have seen this thread http://www.telerik.com/forums/custom-connector-shape?actionMode=replyThread but that changes all the connectors.  I want to change each connector with a unique image.

Your help is appreciated.

Thanks,

Amiel

Amiel
Top achievements
Rank 1
 answered on 29 Sep 2017
1 answer
91 views

Hello,

I'm looking to create generic templates where displayed info, if of a certain type, would be styled as an hyperlink (blue foreground and underlined). When clicked, the button (My first implementation was using a styled RadButton) sends a command from the code-behind. 

Unfortunately, my current implementation even though it works great breaks the Highlighting of the cell and text when searching via the Full search text box on top of the grid.

I have been looking in the source code to understand the way it was implemented, but even templating GridViewCell doesn't seem to work (it never seem to be in Highlighted mode)

 

Any idea?

Best Regards,

Bastian

Stefan
Telerik team
 answered on 29 Sep 2017
2 answers
793 views

In my program,  some time i need to disable some propertyDefinition, when the  propertyDefinition has NestedProperties, i also need disable the expand to prevent user open or close the expander

i try to set the IsEnable propetry as this code

 var expanderButtons= myRadPropertyGrid.ChildrenOfType<RadToggleButton>().Where(b => b.Name == "PART_NestedPropertiesButton").ToList();
            expanderButtons.ForEach(t => t.IsEnabled = false);

it is ok at the beginning but when in the case as follows is not 

1.when close or open the properties group;

2.when call the NestedProperties.Reset() method

3. when  switch the propertyGrid to another one and then switch back

it seems  this method can't be done after the second render

how to achieve this?

thank you

rui
Top achievements
Rank 1
 answered on 29 Sep 2017
2 answers
154 views
Use panelbar How to change the group item  panel to a wrappanel
Stefan
Telerik team
 answered on 29 Sep 2017
3 answers
210 views
Hello,

I've searched the forums and tickets but can't seem to find my specific scenario.

Basically, we have a RadGridView in a RadDocking Pane.  The ItemsSource is bound to a property which is an ObservableCollection.  The issue we are having is when the pane is either pinned or unpinned, the ItemsSource is retrieved again from the property causing scroll position, filters, etc... to be re-set as if the grid was initially loaded.

Is there any way to prevent this from happening, or could this be a bug?  I would like to avoid using an explicit binding mode if possible.

Thanks for the help,
Chris
Martin Ivanov
Telerik team
 answered on 29 Sep 2017
11 answers
343 views
When I have my RadPane's IsHidden property bound to a boolean ViewModel property which is set to true, I get an exception from within Telerik's RadDocking code:

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.Docking
  StackTrace:
       at Telerik.Windows.Controls.RadDocking.OnRadPaneClose(Object sender, StateChangeCommandEventArgs args) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 834
  InnerException: 

Right now this is preventing me from implementing a full MVVM using your controls. I'm hoping this is something I've done wrong but if not, is there any workaround that I can use to get me past this before this bug is fixed (it is a bug)?

From my sample project with only this in it:

Here's my View XAML:

<Window x:Class="Telerik_IsHidden_RadPane_Bug.MainView"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"        mc:Ignorable="d"
        DataContext="{Binding Main, Source={StaticResource Locator}}">
 
    <Grid>
        <!--  Main Window Docking Container (stretch to fill grid) -->
        <telerik:RadDocking Grid.Row="1"
                            HasDocumentHost="false"
                            HorizontalAlignment="Stretch"
                            Margin="0,0,0,32"
                            Name="radDockingMainWindow"
                            VerticalAlignment="Stretch" >
 
            <!--  Split container that holds all of the accordion panels -->
            <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="300, 200"
                                       Name="AccordionContainer"
                                       InitialPosition="DockedLeft"
                                       Orientation="Vertical" VerticalAlignment="Stretch" >
                <!--  Panes must be in pane groups, even if there is just 1 -->
                <telerik:RadPaneGroup MaxWidth="300" x:Name="ToolWindow1Group" >
                    <telerik:RadPane x:Name="ToolWindow1" Title="" CanUserClose="False" CanUserPin="False" CanFloat="True">
                        <Button Content="Example" />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
            <telerik:RadSplitContainer InitialPosition="FloatingDockable"                                 
                    telerik:RadDocking.FloatingLocation="450, 250"
                    telerik:RadDocking.FloatingSize="300, 220" x:Name="uxWindowRadSplitContainer" >
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="Intellifolders" CanDockInDocumentHost="False" IsHidden="{Binding Path=ToolWindowProp}" x:Name="uxToolWindowRadPane">
                        <TextBlock Text="Hi" />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
 
    </Grid>
</Window>


And here's my ViewModel code:

using GalaSoft.MvvmLight;
 
namespace Telerik_IsHidden_RadPane_Bug
{
    /// <summary>
    /// This class contains properties that a View can data bind to.
    /// <para>
    /// Use the <strong>mvvminpc</strong> snippet to add bindable properties to this ViewModel.
    /// </para>
    /// <para>
    /// </para>
    /// </summary>
    public class MainViewModel : ViewModelBase
    {
        public bool ToolWindowProp  
{
get; set; }
 
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel()
        {
            ToolWindowProp = true;
        }
    }
}


Stefan
Telerik team
 answered on 29 Sep 2017
2 answers
137 views

Hello,

I am looking to dynamically set the RadDiagramToolboxGroupStyle based on a style or template selector. I found this : http://www.telerik.com/forums/radwrappanel-instead-of-raduniformgrid-in-raddiagramtoolbox   which does work to set the /default/ style of a RadDiagramToolboxGroup created in the application. However, I don't want to change every instance, just a single one, in a single specific situation. If I add x:Key to my style, what do I change in the definition of the RadDiagramToolbox to implement using that new toolbox group style? (better yet, is there a style or template selector I can use to dynamically set that?)

I've tried the SelectedContentTemplate but I can't seem to get that to work

I've tried ItemContainerStyleSelector that didn't work

I've tried ItemContainerStyle inside the HierarchicalDataTemplate applied to the raddiagramtoolbox.ItemTemplate and that also didn't work

 

Any advice?

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Sep 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?