Telerik Forums
UI for WPF Forum
3 answers
112 views

Hello,

I have a problem about BreadCrumb Sample,when I set the default Path to the root,

the BreadCrumb did't show the root Image.how can I fix it?

 

Wang
Top achievements
Rank 1
 answered on 17 May 2016
4 answers
68 views

On win10 system, when drag a shape,  the driagrm's  previewkeydown event trigger.

on win7 system this case is not exist,

on  win10 system, when open the vs with administrator, the case is also not exist  

attached is the demo 

Is any resolution to resolve this issue

rui
Top achievements
Rank 1
 answered on 17 May 2016
14 answers
296 views
Hi,
I have a little problem when i use the TileView control in conjonction with the RadfluidContentControl : the datacontext is not inherited by the ContentElement child.
Here is my code:
<Window.Resources>
    <local:TileConverter x:Uid="conv:TileConverter_1"
                        x:Key="TileConverter" />
          
    <Style x:Uid="Style_17"
            TargetType="telerik:RadTileView"
            x:Key="TileGraphStyle">
        <Setter x:Uid="Setter_185"
                Property="IsItemDraggingEnabled"
                Value="True" />
        <Setter x:Uid="Setter_186"
                Property="MaximizeMode"
                Value="One" />
        <Setter x:Uid="Setter_187"
                Property="IsItemsAnimationEnabled"
                Value="False" />
        <Setter x:Uid="Setter_188"
                Property="PreservePositionWhenMaximized"
                Value="True" />
        <Setter x:Uid="Setter_189"
                Property="telerik:TileViewPanel.IsVirtualized"
                Value="True" />
        <Setter x:Uid="Setter_190"
                Property="IsAutoScrollingEnabled"
                Value="True" />
        <Setter x:Uid="Setter_191"
                Property="TileStateChangeTrigger"
                Value="SingleClick" />
        <Setter x:Uid="Setter_192"
                Property="MinimizedColumnWidth"
                Value="300" />
        <Setter x:Uid="Setter_193"
                Property="MinimizedRowHeight"
                Value="300" />
        <Setter x:Uid="Setter_194"
                Property="MinimizedItemsPosition"
                Value="Left" />
    </Style>
  
    <DataTemplate x:Key="LargeTemplate">
        <StackPanel Orientation="Horizontal">
            <TextBlock Background="AliceBlue"
                        Text="This is LargeTemplate" />
            <TextBlock Background="AliceBlue"
                        Text="{Binding Text}" />
        </StackPanel>
    </DataTemplate>
    <DataTemplate x:Key="SmallTemplate">
        <StackPanel Orientation="Horizontal">
            <TextBlock Background="Azure"
                        Text="This is SmallTemplate" />
            <TextBlock Background="Azure"
                        Text="{Binding Text}" />
        </StackPanel>
    </DataTemplate>
    <DataTemplate x:Key="RadFluidContentControlTemplate">
        <telerik:RadFluidContentControl ContentChangeMode="Manual"
                                        TransitionDuration="0:0:.5"
                                        LargeContentTemplate="{StaticResource LargeTemplate}"
                                        SmallContentTemplate="{StaticResource SmallTemplate}"
                                        ContentTemplate="{StaticResource SmallTemplate}"
                                        State="{Binding TileState, Converter={StaticResource TileConverter}}">
        </telerik:RadFluidContentControl>
    </DataTemplate>
</Window.Resources>
<Grid>
    <telerik:RadTileView x:Uid="tileView1"
                            x:Name="tileView1"
                            IsDockingEnabled="True"
                            Style="{StaticResource TileGraphStyle}"
                            ContentTemplate="{StaticResource RadFluidContentControlTemplate}"
                            ItemsSource="{Binding Items}">
        <telerik:RadTileView.ItemTemplate>
            <DataTemplate x:Uid="DataTemplate_4">
                <TextBlock x:Uid="TextBlock_11"
                            Text="{Binding Level}" />
            </DataTemplate>
        </telerik:RadTileView.ItemTemplate>
    </telerik:RadTileView>
</Grid>

The viewmodels :
public class MainViewModel : ViewModelBase
{
    public MainViewModel()
    {
        this.Items = new List<Item>()
        {
            new Item() { Level = 1, Text ="AAAA"},
            new Item() { Level = 2, Text ="BBBB"},
            new Item() { Level = 3, Text ="CCCC"},
            new Item() { Level = 4, Text ="DDDD"},
        };
    }
  
    public IList<Item> Items { get; private set; }
}
  
public class Item : ViewModelBase
{
    private TileState tileState;
    public int Level { get; set; }
    public string Text { get; set; }
    public TileState TileState
    {
        get
        {
            return this.tileState;
        }
  
        set
        {
            if (this.tileState != value)
            {
                this.tileState = value;
                this.NotifyPropertyChanged("TileState");
            }
        }
    }
}

If i suppress the  RadfluidContentControl all is fine and i see the right text displayed.
Any clues ?

- Cedric -
 
Patrick
Top achievements
Rank 1
 answered on 16 May 2016
1 answer
122 views

Hi Team,

 

I'm new to telerick controls and using image editor control. i would like to know how to change theme for this control like i want to configure visual studio 2013 dark theme;

 

Give some sample code or explain the steps.

 

Regards

Hema

Tanya
Telerik team
 answered on 16 May 2016
3 answers
167 views

With a basic RadPropertyGrid, if I set the Item to an object with a System.Windows.Media.Color property, when I pick a color in the editor, it will properly call the property setter and update Test1's Color value.

 

public class Test1
{
    public System.Windows.Media.Color Color { get; set; }
}

 

If I use the following Test2 class instead, changing the color in the property grid will not call the property setter and the value in the box will not get updated.

public class Test2 : INotifyPropertyChanged
{
    public System.Windows.Media.Color Color { get; set; }
    public event PropertyChangedEventHandler PropertyChanged;
}

Dilyan Traykov
Telerik team
 answered on 16 May 2016
3 answers
320 views

Hi,

We're using version 2015.2.728.45 of Telerik UI for WPF and we are encountering an issue with the hyperlink dialog. Here is the related xaml code used in the ribbon of the application:

<telerik:RadRibbonButton LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/inserthyperlink.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowInsertHyperlinkDialogCommand}" telerik:ScreenTip.Description="Create a link to a Web page, a picture or an e-mail address." telerik:ScreenTip.Title="Insert Hyperlink" Size="Large" Text="Hyperlink" />

Each time we insert/update an hyperlink using the "Insert Hyperlink" modal dialog, we get an extra "http://" prefix added to the beginning of the address. What should we do to avoid this behaviour?

Thanks for your help,

Sébastien

Tanya
Telerik team
 answered on 16 May 2016
0 answers
156 views

Hi,

At the moment, upon loading my usercontrol, I programatically load all my calendar events. I export my outlook calendar folder then import it into the schedule view. I'm wondering what is the best approach to integrate with outlook? I created methods to trigger OnAppointmentDelete and OnAppointmentCreate, such that it'll update outlook. But is this the ideal solution? 

 

        private void LoadOutlook()
        {
            try
            {
                var outlook = new ApplicationClass();
                var OutlookNS = outlook.GetNamespace("MAPI");

                MAPIFolder f = OutlookNS.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);

                CalendarSharing cs = f.GetCalendarExporter();
                cs.CalendarDetail = OlCalendarDetail.olFullDetails;
                cs.StartDate = new DateTime(2011, 11, 1);
                cs.EndDate = new DateTime(2018, 12, 31);
                var tempPath = Path.GetTempPath();
                var tempCalendar = tempPath + "cal.ics";
                cs.SaveAsICal(tempCalendar);
                using (TextReader txtReader = new StreamReader(tempCalendar))
                {
                    this.Import(txtReader);
                }
            }
            catch
            {
                
            }
        }

Minh
Top achievements
Rank 1
 asked on 16 May 2016
6 answers
127 views

So I have a working save/load for my RadPivotGrid with LocalDataProvider, but had performance concerns so added set of wrappers and functionality for QueryableDataProvider.

My wrappers and set with properties (get; set;) of types int, double, string, bool?, string, MyEnum, DateTime[DisplayFormat(DataFormatString = "{0:dd-MM-yyyy}", ApplyFormatInEditMode = true)]

Im not applying any custom aggregates or similar, and in this example I had 1 column, 1 row property and 'count' of ItemID value.

 

The code works fine with LocalDataProvider (though not using wrappers there, instead more complex EF entities), but wit h my lighter QueryableDataProvider datasource it now my export throws an exception when it hits the serialize command `provider.Serialize(this.xPivotGrid_Reports.DataProvider)`

---

An exception of type 'System.Runtime.Serialization.SerializationException' occurred in System.Runtime.Serialization.dll but was not handled in user code

Additional information: Type 'Telerik.Pivot.Queryable.QueryablePropertyAggregateDescription' with data contract name 'QueryablePropertyAggregateDescription:http://schemas.datacontract.org/2004/07/Telerik.Pivot.Queryable' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.

---

 

I cant remember original source, but I found the DataContract code online and changed very little.

And I am aware that the DataProviderSerializer subclass (where KnownTypes is defined) is called LocalDataSourceSerializer, but thats part of question: 

Is there another list like `PivotSerializationHelper.KnownTypes` I should be using, because it seems comprehensive enough and im hardly doing anything strange?

 

---

    [DataContract]
    public class DataProviderSettings
    {
        [DataMember]
        public object[] Aggregates { get; set; }

        [DataMember]
        public object[] Filters { get; set; }

        [DataMember]
        public object[] Rows { get; set; }

        [DataMember]
        public object[] Columns { get; set; }

        [DataMember]
        public int AggregatesLevel { get; set; }

        [DataMember]
        public PivotAxis AggregatesPosition { get; set; }
    }

    public class LocalDataSourceSerializer : DataProviderSerializer
    {
        public override IEnumerable<Type> KnownTypes
        {
            get
            {
                return PivotSerializationHelper.KnownTypes;
            }
        }
    }

    public abstract class DataProviderSerializer
    {
        public abstract IEnumerable<Type> KnownTypes { get; }

        public string Serialize(object context)
        {
            string serialized = string.Empty;

            IDataProvider dataProvider = context as IDataProvider;
            if (dataProvider != null)
            {
                MemoryStream stream = new MemoryStream();

                DataProviderSettings settings = new DataProviderSettings()
                {
                    Aggregates = dataProvider.Settings.AggregateDescriptions.OfType<object>().ToArray(),
                    Filters = dataProvider.Settings.FilterDescriptions.OfType<object>().ToArray(),
                    Rows = dataProvider.Settings.RowGroupDescriptions.OfType<object>().ToArray(),
                    Columns = dataProvider.Settings.ColumnGroupDescriptions.OfType<object>().ToArray(),
                    AggregatesLevel = dataProvider.Settings.AggregatesLevel,
                    AggregatesPosition = dataProvider.Settings.AggregatesPosition
                };

                DataContractSerializer serializer = new DataContractSerializer(typeof(DataProviderSettings), KnownTypes);
                serializer.WriteObject(stream, settings);

                stream.Position = 0;
                var streamReader = new StreamReader(stream);
                serialized += streamReader.ReadToEnd();
            }

            return serialized;
        }

        public void Deserialize(object context, string savedValue)
        {
            IDataProvider dataProvider = context as IDataProvider;
            if (dataProvider != null)
            {
                var stream = new MemoryStream();
                var tw = new StreamWriter(stream);
                tw.Write(savedValue);
                tw.Flush();
                stream.Position = 0;

                DataContractSerializer serializer = new DataContractSerializer(typeof(DataProviderSettings), KnownTypes);
                var result = serializer.ReadObject(stream);

                dataProvider.Settings.AggregateDescriptions.Clear();
                foreach (var aggregateDescription in (result as DataProviderSettings).Aggregates)
                {
                    dataProvider.Settings.AggregateDescriptions.Add(aggregateDescription);
                }

                dataProvider.Settings.FilterDescriptions.Clear();
                foreach (var filterDescription in (result as DataProviderSettings).Filters)
                {
                    dataProvider.Settings.FilterDescriptions.Add(filterDescription);
                }

                dataProvider.Settings.RowGroupDescriptions.Clear();
                foreach (var rowDescription in (result as DataProviderSettings).Rows)
                {
                    dataProvider.Settings.RowGroupDescriptions.Add(rowDescription);
                }

                dataProvider.Settings.ColumnGroupDescriptions.Clear();
                foreach (var columnDescription in (result as DataProviderSettings).Columns)
                {
                    dataProvider.Settings.ColumnGroupDescriptions.Add(columnDescription);
                }

                dataProvider.Settings.AggregatesPosition = (result as DataProviderSettings).AggregatesPosition;
                dataProvider.Settings.AggregatesLevel = (result as DataProviderSettings).AggregatesLevel;
            }
        }
    }

---

 

 

 

Daniel B.
Top achievements
Rank 1
 answered on 16 May 2016
0 answers
85 views

I add raddatafilter as following :

<Grid><Grid.Resources><DataTemplate x:Key="CountryComboboxTemplate" ><telerik:RadComboBox x:Name="CountryCombox2" TabIndex="3"HorizontalAlignment="Left" VerticalAlignment="Center"DisplayMemberPath="CountryName" IsTabStop="True"ClearSelectionButtonContent="Clear" ClearSelectionButtonVisibility="Visible"CanAutocompleteSelectItems="True" CanKeyboardNavigationSelectItems="True"IsEditable="True" IsReadOnly="False" IsTextSearchEnabled="True"OpenDropDownOnFocus="True" IsFilteringEnabled="True"TextSearchMode="Contains" IsDropDownOpen="False" SelectedValue="{Binding Value, Mode=TwoWay, FallbackValue=null}"Width="200" Background="{x:Null}" BorderBrush="{x:Null}" Height="30" Foreground="{DynamicResource white-forground}" Margin="0,5" Grid.Row="2" Grid.Column="2"/></DataTemplate><behaviors:EditorTemplateSelector x:Key="MyEditorTemplateSelector"><behaviors:EditorTemplateSelector.EditorTemplateRules><behaviors:EditorTemplateRule PropertyName="Country" DataTemplate="{StaticResource CountryComboboxTemplate}" /></behaviors:EditorTemplateSelector.EditorTemplateRules></behaviors:EditorTemplateSelector></Grid.Resources><telerik:RadDataFilter Name="Filter" telerik:StyleManager.Theme="Windows8"EditorCreated="OnRadDataFilterEditorCreated"Loaded="Filter_Loaded"MinHeight="193"MaxHeight="250"Width="Auto"Grid.Row="0" behaviors:FilterDescriptorBindingBehavior.FilterDescriptors="{Binding FilterDescriptors, Source={StaticResource model}}"EditorTemplateSelector="{StaticResource MyEditorTemplateSelector}"Margin="1" /></Grid>

the problem is the country not fill in the filter always country is equal too empty , not the selected country
and code behind looks like

public FilterDataUserControl(){InitializeComponent();var list = new List<FilterCriterea>();list.Add(new FilterCriterea());Filter.Source = list;}private void OnRadDataFilterEditorCreated(object sender, EditorCreatedEventArgs e){if (DataContext != null){var datacontextVm = DataContext as AdvancedSearchManagerViewModel;if (datacontextVm != null){switch (e.ItemPropertyDefinition.PropertyName){case "Country":RadComboBox countrycomboBoxEditor = (RadComboBox)e.Editor; countrycomboBoxEditor.ItemsSource = datacontextVm.CountryCollectionViewModelIns;break;}}}}private void Filter_Loaded(object sender, RoutedEventArgs e){Filter.ItemPropertyDefinitions.Add(new ItemPropertyDefinition("Country", typeof(Country), "Country"));}}

 

Ali
Top achievements
Rank 1
 asked on 13 May 2016
0 answers
72 views

Hi, I implemented an Autocompletebox within an Edit Appointment's dialog,I was able to set the ItemsSource to be a staticresource of the viewmodel, But I can't seem to set it as a property of my CustomAppointment. May I ask how do I do that.

 

Also upon creation of a new appointment, I send it off to make the changes in outlook as well. But the problem is that the code below is of type IAppointment. How do I get the value of the customappointment OnSchedulerAppointmentCreated 

        private void OnSchedulerAppointmentCreated(object sender, AppointmentCreatedEventArgs e)
        {
            (this.DataContext as CalendarViewModel).NewAppointment((CustomAppointment)e.CreatedAppointment);
        }

Minh
Top achievements
Rank 1
 asked on 13 May 2016
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?