Telerik Forums
UI for WPF Forum
5 answers
61 views
Hi

I am creating a datagrid view and I am trying this property to the RagGridView in XAML

telerik:StyleManager.Theme="Office_Black"

And I am copying that from a telerik example, and it generates error when I compile
The error is:

The property 'StyleManager.Theme' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'.

I appreciate the help.

Thanks






Vlad
Telerik team
 answered on 06 Apr 2009
1 answer
50 views
Hi,

I've updated my application to 2009 Q1 and setting the color of the cell doesn't work anymore!

  <my:ColorConverter x:Key="ColorConverter"/>  
                        <Style TargetType="{x:Type telerik:GridViewCell}">  
                            <Setter Property="Background">  
                                <Setter.Value> 
                                    <SolidColorBrush Color="{Binding Converter={StaticResource ColorConverter}}"></SolidColorBrush> 
                                </Setter.Value> 
                            </Setter> 
                        </Style> 

The color converter returns a Color.Red.

Any ideas?

Regards
Kalin Milanov
Telerik team
 answered on 03 Apr 2009
2 answers
199 views
Hi
currently I'm building the application that perform some kind of monitoring. 
For displaying the information I'm using all kinds of RadGauge (i.e. Circular, Linear, Digital).
All is fine and the controls look amazing, however I have found that the application has a memory problem 
(i.e. more time the application is running - more memory it has been using). The application doesn't use any kind of saving the history, I mean that it is just Real Time Monitoring - thats why there shouldn't be increasing memory size used by the application.

In general the application architecture is very simple and as I have found later it is quite similar to those you are using in the demo example (i.e. CarDashboard Gauge WPF example).
So, in general I have an object that has a list of monitoring properties, the object itself derived from INotifyPropertyChanged interface to be able to reflect the UI elements(i.e. gauges that are binded to those properties - simple binding) and DispathcherTimer which update the properties values with some interval.

I have used the .Net Memory Profiler to determine the reason of memory increasing and found that the problem in Resources that RadGauges used - they are not releasing. There are different kind of resources, for example objects like

System.Windows.Media.Animation.Clock.RootData
System.Windows.Media.Animation.Clock.SubtreeFinalizer
System.Windows.Media.Animation.AnimationClock

and many others. In the period of 20 min with the update interval set to 1 sec I have from 4 to 2 thousand new instances of each of those types have been created and haven't been removed. And here is the place where the memory of my application is increased.

If we would check the Call Stack of each of those object types we would found very similar in each case and that would be something like this
(example of call stack for System.Windows.Media.Animation.AnimationClock)
AnimationTimeline.AllocateClock()
Clock.AllocateClock(Timeline, bool)
ClockGroup.BuildClockSubTreeFromTimeline(Timeline, bool)
Clock.BuildClockTreeFromTimeline(Timeline, bool)
Timeline.CreateClock(bool)
Storyboard.BeginCommon(DependencyObject, INameScope, HandoffBehavior, bool, long)
Storyboard.Begin(FrameworkElement, HandoffBehavior, bool)
Storyboard.Begin(FrameworkElement, HandoffBehavior)
IndicatorBase.OnValueChanged(double, double)
IndicatorBase.ValuePropertyChangedHandler(DependencyObject, DependencyPropertyChangedEventArgs)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs)
DependencyObject.UpdateEffectiveValue(EntryIndex, DependencyProperty, PropertyMetadata, EffectiveValueEntry, EffectiveValueEntry&, bool, OperationType)
DependencyObject.InvalidateProperty(DependencyProperty)
BindingExpression.Invalidate(bool)
BindingExpression.TransferValue(object, bool)
BindingExpression.ScheduleTransfer(bool)
ClrBindingWorker.NewValueAvailable(bool, bool, bool)
PropertyPathWorker.UpdateSourceValueState(int, ICollectionView, object, bool)
PropertyPathWorker.UpdateSourceValueState(int, ICollectionView)
PropertyPathWorker.OnPropertyChangedAtLevel(int)
ClrBindingWorker.OnSourcePropertyChanged(object, string)
PropertyPathWorker.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type, object, EventArgs)
WeakEventManager.DeliverEventToList(object, EventArgs, WeakEventManager.ListenerList)
PropertyChangedEventManager.OnPropertyChanged(object, PropertyChangedEventArgs)
MonitoringElement.NotifyPropertyChanged(string)
MonitoringPerformanceCounter.set_Value(float)
MonitoringPerformanceCounter.UpdateMonitoringElementIndicators()
MonitoringGroup.UpdateGroupElementsIndicators()
MonitoringGroupList.UpdateMonitoringElementsIndicatorsInAllGroups()
MonitoringServerInfoHolder.UpdateIndicators()
Dashboard.UpdaterTimer_Tick(object, EventArgs)
DispatcherTimer.FireTick(object)

So, as you can see those objects are created in response to update RadGauge's value and most probably they are created to perform smooth moving from previous value to new one.

Unfortunately, I can't attach the Profiler screen shots as I didn't found if this is possible in your forums.

So do you how can I release those unneeded resources?

Any help will be appreciated.

Thanks
Sergey
Top achievements
Rank 1
 answered on 02 Apr 2009
4 answers
152 views
Hello

For the localization of my application I have created a custom MarkupExtension called CaptionExtension. I'm using it to set the HeaderText in the WPF RadGridView as follows:
<telerik:GridViewDataColumn IsFilterable="False" HeaderText="{local:Caption Key=memberNumberShort}" UniqueName="MemberNumber"/> 
 The relevant code of the CaptionExtension class looks like this:
        private void LocalizationContext_CultureChanged(object sender, EventArgs e) {  
            if (targetObject != null && targetProperty != null) {  
                targetObject.SetValue(targetProperty, LocalizationContext.Instance.Captions[key]);  
            }  
        }  
          
        public override object ProvideValue(IServiceProvider serviceProvider) {  
            var targetHelper = (IProvideValueTarget)serviceProvider.GetService(typeof(IProvideValueTarget));   
            targetObject = targetHelper.TargetObject as DependencyObject;   
            targetProperty = targetHelper.TargetProperty as DependencyProperty;  
 
            return LocalizationContext.Instance.Captions[key];  
        }  
 

So basically it tries to remember to which DependencyObject (targetObject variable) which DependencyProperty (targetProperty variable) was initially set. This happens in the ProvideValue()-method. Then in the LocalizationContext_CultureChanged()-event handler method, it tries to set the new value using the combination of DependencyObject/DependencyProperty combination.

For the HeaderText property the value of targetObject is of type GridViewDataColumn and the targetProperty is the HeaderText DependencyProperty. I've made sure that is really the case using the debugger.

Unfortunately the correct text is only set initially so during the call of the ProvideValue when the RadGridView is created the first time. Setting the HeaderText in the LocalizationContext_CultureChanged() does not work. There is no exception or anything, just nothing happens, the HeaderText does not change in display.

Any help is welcome.

Regards

Christian


Kalin Milanov
Telerik team
 answered on 01 Apr 2009
1 answer
236 views
Hello,

I need to change foreground color of axis value labels. I tried to set style of AxisX(Y)Label2D, but with no effect.

<

 

Style TargetType="{x:Type telerik:AxisXLabel2D}">

 

 

 

    <Setter Property="Foreground" Value="Red" />

 

 

 

</Style>

Thanks for your reply!

Marek

 

Ves
Telerik team
 answered on 30 Mar 2009
2 answers
67 views
Hi

I have been given a task whereby the business want  a Summary form which has excel like features(header freezing, column freezing, export to excel). So this component sounds a good fit. They also want the gridview populating depending on what is selected on a seperate dropdown, checked combo box and search textbox. These 3 controls control what data is displayed in the gridview. Can this be done?
jonathan
Top achievements
Rank 1
 answered on 30 Mar 2009
1 answer
190 views
What had happen to the telerik theme???.
The Intellisense dosnt recognize but still works... but the style ahs changed few colors.... that i dont like. how i can get back the old theme?
Kalin Milanov
Telerik team
 answered on 30 Mar 2009
5 answers
148 views
To be able to use the RadGridView control in our software, we need to be able to get a Filtered result list from the control. I've tried to see the where I could be able to get such a list while debugging after a gridView.ItemsControl.RecordManager.FilterDescription.PropertyChanged event, but I'm unable to find it.

Could anyone point me in the right direction?

 

Vlad
Telerik team
 answered on 30 Mar 2009
1 answer
121 views
Hi

I have a carousel that is filled with a list of images like this..

Dim MyListOfImages As New List(Of _Images)

 

MyListOfImages.Add( .....



RadCarousel1.ItemsSource = MyListOfImages

But there are no images displayed, only images with the current image path. Why is that, and how do I fix this?

Hristo Deshev
Telerik team
 answered on 27 Mar 2009
3 answers
167 views
Hello,

I have successfully created the guage that I want to use a design-time in XAML. However, I have a need to create the guage at runtime. Everytime that I try to add a RadialScale to a Grid, WPF throws an Exception that says:

The calling thread cannot access this object because a different thread owns it.

What am I doing wrong? Here is my code:

// Setup the grid that the gauge will be defined in
System.Windows.Controls.Grid gaugeGrid = new System.Windows.Controls.Grid();
gaugeGrid.Height = 140;
gaugeGrid.Width = 140;
gaugeGrid.Margin = new Thickness(0, 20, 0, 0);

// Define the radial scale with the Telerik control
RadialScale radialScale = new RadialScale();
radialScale.Min = 40;
radialScale.Max = 60;
radialScale.MinorTicks = 2;
radialScale.MajorTicks = 6;

// Exception gets thrown here
gaugeGrid.Children.Add(radialScale);
Andrey
Telerik team
 answered on 27 Mar 2009
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?