Telerik Forums
UI for WPF Forum
3 answers
174 views
I'm binding my carousel to a child collection of an item on my ViewModel. This collection is an EntityCollection, but when I add an item to that bound collection, it's not being reflected in the carousel. It's not picking up the change.

My bound collection is a child collection to a EF entity object on my viewModel. I've tried capturing the event on my viewmodel and Raising a PropertyChanged on it, but that doesn't work either. My code is being fired, but that isn't updating the carousel. Maybe because I'm raising a propertyChanged, not a collection Changed?
Maya
Telerik team
 answered on 20 Jun 2011
1 answer
113 views
Hello,

We have an issue with a radgridview where we have custom expandability setup on the rows. When we sort on a column, the rows that have IsExpandable set to false get set back to true after the sort has happened. We set up a custom binding for the IsExpandable properties on the rows that have it set to false initially to get an idea of whats happening to cause it to go back to true on the sort. Here is the callstack:
FieldBridgeApp.exe!FieldBridgeApp.ProviderActionsGrid.set_IsExpandableProperty(Boolean value) Line 41    Basic
[Native to Managed Transition]    
[Managed to Native Transition]    
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.SetValue(object item, object value) + 0xb1 bytes    
PresentationFramework.dll!MS.Internal.Data.ClrBindingWorker.UpdateValue(object value) + 0x70 bytes    
PresentationFramework.dll!System.Windows.Data.BindingExpression.UpdateSource(object value) + 0x80 bytes    
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.UpdateValue() + 0x62 bytes    
PresentationFramework.dll!System.Windows.Data.BindingExpression.Update(bool synchronous) + 0x60 bytes    
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.Dirty() + 0x33 bytes    
PresentationFramework.dll!System.Windows.Data.BindingExpression.SetValue(System.Windows.DependencyObject d, System.Windows.DependencyProperty dp, object value) + 0x27 bytes    
WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty dp, object value, System.Windows.PropertyMetadata metadata, bool coerceWithDeferredReference, System.Windows.OperationType operationType, bool isInternal) + 0x229 bytes    
WindowsBase.dll!System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty dp, object value) + 0x2e bytes    
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewRow.IsExpandable.set(bool value) + 0x4d bytes    
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.InitializeHierarchyProperties(Telerik.Windows.Controls.GridView.GridViewRow gridViewRow) + 0x48 bytes    
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.PrepareContainerForItemOverride(System.Windows.DependencyObject element, object item) + 0x1a4 bytes    
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.BaseItemsControl.Telerik.Windows.Controls.GridView.IGeneratorHost.PrepareItemContainer(System.Windows.DependencyObject container, object item) + 0x89 bytes    
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(System.Windows.DependencyObject container) + 0x52 bytes    
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertContainer(int childIndex, System.Windows.UIElement container, bool isRecycled) + 0x189 bytes    
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertRecycledContainer(int childIndex, System.Windows.UIElement container) + 0x2a bytes    
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.AddContainerFromGenerator(int childIndex, System.Windows.UIElement child, bool newlyRealized) + 0x96 bytes    
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(System.Windows.Size constraint) + 0xed8 bytes    
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) + 0x1d0 bytes    
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) + 0x337 bytes    
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() + 0x1c4 bytes    
PresentationCore.dll!System.Windows.UIElement.UpdateLayout() + 0x16 bytes    
PresentationCore.dll!System.Windows.Interop.HwndSource.Process_WM_SIZE(System.Windows.UIElement rootUIElement, System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x2d0 bytes    
PresentationCore.dll!System.Windows.Interop.HwndSource.LayoutFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x160 bytes    
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0xbe bytes    
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x7a bytes    
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, bool isSingleParameter) + 0x8a bytes    
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler) + 0x4a bytes    
WindowsBase.dll!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate callback, object args, bool isSingleParameter, System.Delegate catchHandler) + 0x44 bytes    
WindowsBase.dll!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, bool isSingleParameter) + 0x91 bytes    
WindowsBase.dll!System.Windows.Threading.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority priority, System.Delegate method, object arg) + 0x40 bytes    
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0xdc bytes    
[Native to Managed Transition]    
WindowsBase.dll!MS.Win32.HwndSubclass.DefWndProcWrapper(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x78 bytes    
[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) + 0x125 bytes    
[Native to Managed Transition]    
[Managed to Native Transition]    
WindowsBase.dll!System.Windows.Threading.Dispatcher.GetMessage(ref System.Windows.Interop.MSG msg, System.IntPtr hwnd, int minMessage, int maxMessage) + 0x76 bytes    
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) + 0x8b bytes    
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x49 bytes    
WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() + 0x4c bytes    
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) + 0x1e bytes    
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x6f bytes    
PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x26 bytes    
PresentationFramework.dll!System.Windows.Application.Run() + 0x19 bytes    
FieldBridgeApp.exe!FieldBridgeApp.Application.Main() Line 91 + 0xa bytes    Basic
[Native to Managed Transition]    
[Managed to Native Transition]    
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) + 0x3a bytes    
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x2b bytes    
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x66 bytes    
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6f bytes    
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes    

We are trying to figure out why this is happening. We would like those rows to stay unexpandable.

Thanks.

Maya
Telerik team
 answered on 20 Jun 2011
1 answer
134 views
Hi,

I have a wpf project and I create a semi-transparent balck UserControl with a RadBusyIndicatror to indicate to my users that a synch job is being in progress.

The problem is when the job start, it's look like the job pulling all resources from the cpu and the RadBusyIndcator don't have enough cpu resources to show his fluid animation. The animation start, stop, start, stop, start, stop and so on...

code example:

BusyControl busyControl = new BusyControl();
busyControl.Start("Job in progress. Please wait...");
SynchroneJob();
busyControl.Stop();

Thank's
Yana
Telerik team
 answered on 20 Jun 2011
5 answers
131 views
hi,
I downloaded the new version of Telerik  controls -RadControls_for_WPF_2010_1_0422,
and lot of things have changed like colors and other Properties.
I want to use the new version but to stay with my old design.
I used 'SummerTheme' in the last version and now it's not in the same colors.
thanx.


Vanya Pavlova
Telerik team
 answered on 20 Jun 2011
3 answers
146 views
Hello,

I have entity framework classes, one is DownloadLink and i have these two columns to gird (not binded to any DownloadLink properties)

<telerik:GridViewColumn Header="New F.H.Id" UniqueName="NewFilehostId" Width="*"></telerik:GridViewColumn><telerik:GridViewColumn Header="New URL" UniqueName="NewUrl" Width="*"></telerik:GridViewColumn>

Only easy way to iterate row i found is using  radGridViewReuploadStatus.Items, but that way i can't access those two added columns.

So i think easiest way would be to somehow extend DownloadLink and add these two new fields, i tried it like this

class
 DownloadLinkExtended : DownloadLink {         public DownloadLinkExtended(DownloadLink origDl){             PropertyInfo[] myObjectProperties = origDl.GetType().GetProperties(); //BindingFlags.Public | BindingFlags.NonPublic             foreach (PropertyInfo pi in myObjectProperties)             {                 object value = pi.GetValue(origDl, null);                 if (value != null)                 {                     try                     {                         pi.SetValue(this, value, null);                     }                     catch (Exception) {                          //selze to na komplexnim typu jako napr. PostData                     }                 }             }         }         public string NewUrl { getset; }         public string NewIdOnFilehost { getset; }     }
But well that reflection does not work and i don't have it set up like DownloadLinkExtended.DownloadLink because then every grid bound column would need to be DownloadLink.field and i don't want it that way. Also setting it in constructor for each property individually is to much error prone manual work.

Other solution would be to get rows somehow like this
IList<GridViewRow> rows = radGridView.ChildrenOfType<GridViewRow>();
But since there is no .Rows this it seams to me that it is not your recommended way.

So what is ideal solution. Or how to nicely extend my DownloadLink class to include that two new required fields?
Ivan Ivanov
Telerik team
 answered on 20 Jun 2011
7 answers
98 views
Hi,

Looks like RadDragAndDropManager is not ThreadStatic which causes application crash as We have UI in two different threads.

I have RadDragAndDropManager.EnableNativeDrag = true set in my Base control Constructor. 

Now that base control is used at multiple places in my application. 
In our main UI thread we have this control and from this thread we started another thread which has UI and in that window we make use of our control at many places in various window forms. And so whenever we open a window which contain that base control lookslike RadDragAndManager call the reset function on  DesktopDragDropProvider object. 

But when I go back to first UI Thread and click on the control that is using RadDragAndDropManager UE occurs.

************** Exception Text **************
System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
   at System.Windows.Threading.Dispatcher.VerifyAccess()
   at System.Windows.Threading.DispatcherObject.VerifyAccess()
   at System.Windows.DependencyObject.GetValue(DependencyProperty dp)
   at System.Windows.Controls.ContentControl.get_Content()
   at Telerik.Windows.Controls.DragDrop.UndetectableWindow.set_Child(FrameworkElement value)
   at Telerik.Windows.Controls.DragDrop.DesktopDragDropProvider.Reset()
   at Telerik.Windows.Controls.DragDrop.DesktopDragDropProvider.OnLeftMouseButtonUp(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Xm8.App.X.Program.ShowControlCenter(ControlCenterParameters ccParams)
   at Xm8.App.X.Program.ShowCC(Object parameter)
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)


In my understanding RadDragAndDropManager should be ThreadStatic rather than just the static. that might solve the problem.

Regards
Sanket
Yordanka
Telerik team
 answered on 20 Jun 2011
6 answers
296 views
My column footers are summed using an aggregate (SumFunction).
I need to calculate the percent of a grand total represented by the sum of each column. The grand total is calculated as a sum function too.

Essentially I'm looking to do the following: (think Excel)

B5/E5  C5/E5  D5/E5 etc...where E5 is the grand total in the totals column and B5, C5 etc are the sums for their respective columns.

I'm following the pattern for creating a custom aggregate. Here is what I have so far.  What I need is a way to pass the grand total value to the Percent method. Or if that isn't possible some other approach?

public static double Percent<TSource>(IEnumerable<TSource> source, Func<TSource, int?> selector)
{
  return (source.Select(selector).Aggregate(0, (t1, t2) => t1 + (int)t2) * .01);
}
Maya
Telerik team
 answered on 20 Jun 2011
3 answers
121 views
Hi 

Filter with out case sensitive work fine.
But the same items with Different Case come as Different CheckBoxes in the Filter Select Option

eg:
ABD  and abc comes as different filter select options. I want to set this as one.
Is this possible

Rossen Hristov
Telerik team
 answered on 20 Jun 2011
1 answer
365 views
Hi,
I want Show Only Year In DatePicker.

I Set DateSelectionMode="Year".

But When i select a year it show 1/1/year.

i want to only year not 1/1/year

thank`s for Help.
Yana
Telerik team
 answered on 20 Jun 2011
3 answers
174 views

A couple of questions:

1)  The *TRIAL* download page for WPF controls list the following options:

WPF 3.5 - Automatic Installation (msi, 199 MB)
WPF 3.5 - Manual Installation (zip, 193 MB)
WPF 3.5 - DLLs only (zip, 19 MB)
WPF 4 - Manual installation (msi, 92 MB)
WPF 4 - Manual installation (zip, 193 MB)
WPF 4 - DLLs only (zip, 19 MB)

As you can see, There is no "Automatic" installation for the WPF 4 controls? Is that just a typo? is the "WPF 4 - Manual installation (msi, 92 MB)" really supposed to be named "WPF 4 - Automatic installation (msi, 92 MB)"? The link for the payed version appears to label them correctly.

2) the download page also list hot fixes for both 3.5 and 4.0 versions. Do i still have to apply the hot fixes or are they included on the latest full download?

3) If I installed the 3.5 version by mistake and now want to install the 4.0 version. Will the WPF 4.0 installer ask me if I want to upgrade my 3.5 dlls to 4.0 or do I have to do all this manually. If I have to do it manually is there a link that show the steps to follow to make this as painless of a process as possible?

Thank you. 
Milan
Telerik team
 answered on 20 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?