Telerik Forums
UI for WPF Forum
8 answers
479 views
Is it possible to automatically scroll a RadListBox when dragging an item over the top or bottom of the ListBox?
Yana
Telerik team
 answered on 17 May 2016
3 answers
482 views

Hello,

I have a program that, each time I open a new file on it creates a new main window on its own thread.

Everything is working OK, except on the following scenario:

  1. A file in opened in the application main window.
  2. A second file is opened in a new main window.
  3. In this second main window, a RadWindow is opened.
  4. The RadWindow is moved.

At this time, the application crashes with the following exception and stack trace:

The calling thread cannot access this object because a different thread owns it.    Exception {InvalidOperationException}

     WindowsBase.dll!System.Windows.Threading.Dispatcher.VerifyAccess()    Unknown
     PresentationFramework.dll!System.Windows.Application.MainWindow.get()    Unknown
     Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.GetDpiIndependentPrimaryScreenSize()    Unknown
     Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.HandleGetMinMaxInfo(System.IntPtr hwnd = {System.IntPtr}, System.IntPtr wParam = {System.IntPtr}, System.IntPtr lParam = {System.IntPtr}, out bool handled = false)    Unknown
     Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WndProc(System.IntPtr hwnd = {System.IntPtr}, int msg = 36, System.IntPtr wParam = {System.IntPtr}, System.IntPtr lParam = {System.IntPtr}, ref bool handled = false)    Unknown
     PresentationCore.dll!System.Windows.Interop.HwndSource.PublicHooksFilterMessage(System.IntPtr hwnd = {System.IntPtr}, int msg, System.IntPtr wParam = {System.IntPtr}, System.IntPtr lParam = {System.IntPtr}, ref bool handled = false)    Unknown
     WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd = {System.IntPtr}, int msg, System.IntPtr wParam = {System.IntPtr}, System.IntPtr lParam = {System.IntPtr}, ref bool handled = false)    Unknown
     WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)    Unknown
     WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)    Unknown
     WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source = {System.Windows.Threading.Dispatcher}, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler = null)    Unknown
     WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)    Unknown
     WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd = {System.IntPtr}, int msg, System.IntPtr wParam = {System.IntPtr}, System.IntPtr lParam = {System.IntPtr})    Unknown
     [Native to Managed Transition]    
     [Managed to Native Transition]    
     WindowsBase.dll!MS.Win32.HwndSubclass.DefWndProcWrapper(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)    Unknown
     [Native to Managed Transition]    
     [Managed to Native Transition]    
     WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)    Unknown
     [Native to Managed Transition]    
     [Managed to Native Transition]    
     WindowsBase.dll!MS.Win32.HwndSubclass.DefWndProcWrapper(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)    Unknown
     [Native to Managed Transition]    
     [Managed to Native Transition]    
     WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)    Unknown
     [Native to Managed Transition]    
     [Managed to Native Transition]    
     WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame = {System.Windows.Threading.DispatcherFrame})    Unknown
     PresentationFramework.dll!System.Windows.Window.ShowHelper(object booleanBox)    Unknown
     PresentationFramework.dll!System.Windows.Window.ShowDialog()    Unknown
     Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(bool isModal = true)    Unknown
     Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.WindowBase.ShowWindow(bool isModal = true)    Unknown
     Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadWindow.ShowDialog()    Unknown

 

Note that doing the same on the first main window doesn't crash the application.

Nasko
Telerik team
 answered on 17 May 2016
1 answer
61 views

Dear all Telerik UI for WPF team members.

Recently I have encountered a couple of problems with RadDiagram.

Please help our team to proceed forward soon.

 

My question is below.

When we draw a diagram via your RadDiagram, bezier and spline is perfect form as we expected.

But, after we decided to save this form and to check whether this form is correct, we reloaded it.

The problem is here.

Reloaded diagram is malformed (just we thought)

Please check attached image file (before & after save a diagram) and our code.

 

            <telerik:RadDiagram x:Name="diagram" Grid.Row="1" Grid.Column="1"
                                Width="900" Height="700"
                                SelectedItem="{Binding SelectedItem}" IsZoomEnabled="False"
                                IsSnapToItemsEnabled="False" IsSnapToGridEnabled="False"
                                GraphSource="{Binding GraphSource}"
                                Margin="{DynamicResource UIBorderMargin}">
                <primitives:ItemInformationAdorner.AdditionalContent>
                    <telerik:SettingsPane Diagram="{Binding ElementName=diagram}" />
                </primitives:ItemInformationAdorner.AdditionalContent>
            </telerik:RadDiagram>

 

Thanks in advance.

Brian Kwon from South Korea.

Petar Mladenov
Telerik team
 answered on 17 May 2016
3 answers
125 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
75 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
316 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
135 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
185 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
345 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
180 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
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?