Telerik Forums
UI for WPF Forum
3 answers
166 views
Hi,

after updating, I'm getting error when I try to change  AccentColor of metro theme. This is the error:

"Cannot set a property on object 'Telerik.Windows.Controls.MetroColorPalette' because it is in a read-only state."

Stack trace:

   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.MetroColorPalette.set_AccentColor(Color value) in c:\TB\100\WPF_Scrum\Current_HotFix\Sources\Development\Core\Controls\Theming\MetroColorPalette.cs:line 48
   at Ged.App.OnStartup(StartupEventArgs e) in D:\Paulo\Projetos\sygged\Ged\Ged\App.xaml.cs:line 36
   at System.Windows.Application.<.ctor>b__1(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   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 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at Ged.App.Main() in D:\Paulo\Projetos\sygged\Ged\Ged\obj\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

My code:

 
StyleManager.ApplicationTheme = new MetroTheme();
var findResource = FindResource("BaseColor");
if (findResource != null)
    MetroColors.PaletteInstance.AccentColor = (Color)findResource;

Dimitrina
Telerik team
 answered on 02 Feb 2012
0 answers
68 views
Strange red colour border line is coming if I select a gridview.  Can somebody tell me how to remove this red color border line.
Richa
Top achievements
Rank 1
 asked on 02 Feb 2012
1 answer
224 views

I am not able to get the scrolling working on RadPanes which are loaded using Prism's region manager onto a RadGroup.

Here is the main shell window which is hosting RadDock

<Grid>
   <telerik:RadDocking AllowUnsafeMode="True" Grid.Row="1"> 
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup prism:RegionManager.RegionName="{x:Static CommonUI:Constants.RegionShellCenter}" />
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>

       <telerik:RadSplitContainer InitialPosition="DockedRight" Width="600" >
                <telerik:RadPaneGroup prism:RegionManager.RegionName="{x:Static CommonUI:Constants.RegionShellRight}"/>
            </telerik:RadSplitContainer>
    </telerik:RadDocking>
  </Grid>

Here is my RadPane class that I load onto the above RadPaneGroup. This pane hosts a local usercontrol.

<telerik:RadPane x:Class="MyNamespace.ReservoirDataPane"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:prism="http://www.codeplex.com/prism"
             xmlns:local="clr-namespace:MyNamespace"
             Header="Reservoir">
     <local:ResPropControl/>
</telerik:RadPane>
 [Export]
    public partial class ReservoirDataPane : RadPane
    { }


I tried having Scroll around the RadPaneGroup and then inside RadPane around the local usercontrol. I also tried enabling it in the
Grid inside the usercontrol. None of this worked. Any help will be greatly appreciated. Thanks.
sonnet
Top achievements
Rank 1
 answered on 02 Feb 2012
2 answers
122 views
Hi,

Can we implement the spellChecker on Radbutton using Command binding? this there a sample implementation for this?

Regards,
Howell
Andrew
Telerik team
 answered on 01 Feb 2012
1 answer
145 views
Hi, I embedded a RadRibbonView  in a RadRibbonWindow. I expected the Application Icon to look as in Img.1 




But I get it as below - icon before the tabs.



Can someone please suggest me what I should be doing to achieve the Round Shaped Application icon as in IMG 1 ?

Thanks,
Nav

Petar Mladenov
Telerik team
 answered on 01 Feb 2012
2 answers
174 views
I want to use RadGridView to display missing relations in a database using the Entity framework. I have defined several columns with path bindings to subtables. (eg. Table1.ID) When the datagrid is loading such a column with a 1 to 1 relation the entity framework throws an exception if the related row does not exist in the database, but the RadGridView does not display this error. (I tried several binding settings and manually added an ExceptionValidationRule and set the ValidateOnTargedUpdated = true, but the errors don't show up in the datagrid) The ultimate solution would be if I could display an error message like "Related row in Table XXX and ID 123 not found" in the tooltip of the grid cell.

The only way the error gets displayed is to write a validator which e.g. checks for null values and then to enter the cell edit mode. Then the error gets displayed. But I never got the entity framework exception to display in the datagrid.

Another approach is to write a DataTemplate for every column which triggers the Validation.HasError event. Using this method the errors get displayed when the column is bound, but this does also not work for entity framework exceptions and needs a lot of xaml code. What is the best solution to get a good error message without to write a lot of xaml code?
Yordanka
Telerik team
 answered on 01 Feb 2012
1 answer
163 views
Hi,

I use a RadDataPager bound to a Linq2Sql table.
This works fine, but since I have a lot of data it takes about 2 seconds to change a page.

Here my Problem starts.
I want to indicate the loading by showing a busy indicator.

This works (without any coding) when I use async dataloading on the RadGridView.
But then a sort / filter breaks the application.
I found some other topic here that this is "normal".

I also tried to handle PageIndexChangeing and DataLoaded setting IsBusy on the Grid.
But it doesn't work (UI is not updated while loading).

So is there a way to achieve what I want since Async Loading is not an Option on the Grid.

Thanks
Manfred
Yordanka
Telerik team
 answered on 01 Feb 2012
2 answers
181 views
I would like to bind a data trigger in a style trigger based on a row number. I need to suppress a value in a cell but only for the first row.

I'm not sure what property to bind to to get the row index or something similar.

Any help would be greatly appreciated.

Thanks,

John
John
Top achievements
Rank 1
 answered on 01 Feb 2012
4 answers
293 views
Hi,

when I set my RadWindow WindowState property to Maximized, at startup, my RadWindow appear over my taskbar. Is it possible to have the same behavior as the standard Window class.

Thank's
Boyan
Telerik team
 answered on 01 Feb 2012
0 answers
78 views

I am not able to get the rows having all the columns. Only the columns which are visible using scrollbar are coming as cells of that row.

I have used below given code.

var
rows = gridView.ChildrenOfType<GridViewRow>();

 

 

 

foreach (var row in rows)

 

{

 

 

foreach (var cell in row.Cells)

 

{

 

 

foreach (var selectedItem in gridView.SelectedItems)

 

 

 

{

 

 

 

var row = (gridView.ItemContainerGenerator.ContainerFromIndex(1) as GridViewRow);

 

 

 

 foreach (var cell in row.Cells)


Please suggest me how to get full row having all the columns from selected items.
I have enabled column & row virtulization.

 

Richa
Top achievements
Rank 1
 asked on 01 Feb 2012
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
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?