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:
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.
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.
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?
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
<
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
>
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"
);
}
}
}
}
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
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;
}
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
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
{
}
}