Telerik Forums
UI for WPF Forum
1 answer
142 views
Hi,

I implement the radclock control like the examples. It works. But i need to bind the ObservableCollection<timespan> to itemssource instead to set it in the constructor. The binding do not work.

Here my binding.
<telerik:RadClock x:Name="clock" Width="260" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="3" Grid.Row="0" Grid.RowSpan="6"
                          ItemsSource="{Binding Times}"/>
       

         public ObservableCollection<TimeSpan> Times
        {
            get { return LoadDataObjects(); }
        }

 

What is wrong?

Thanks
Annett

Ivo
Telerik team
 answered on 07 Feb 2012
1 answer
147 views
Hi, I'm not sure if I am on track here, I hope there is an easier solution to this.
But I am trying to create an grid with footer witch has three editable rows (see attachment). My code is the following ->

private GridViewDataColumn bindColumn(string bindText, string headerAndTag, string cellText1, string cellText2, string cellText3)
        {
            GridViewFooterCell cell = new GridViewFooterCell();
            StackPanel sp = new StackPanel();
            TextBox cell1 = new TextBox() { Text = cellText1 };
            TextBox cell2 = new TextBox() { Text = cellText2 };
            TextBox cell3 = new TextBox() { Text = cellText3 };
 
            sp.Children.Add(cell1);
            sp.Children.Add(cell2);
            sp.Children.Add(cell3);
 
            GridViewDataColumn col  = new GridViewDataColumn();
            col.HeaderTextAlignment = TextAlignment.Right;
            col.DataFormatString    = "{0:N0}";
            col.TextAlignment       = TextAlignment.Right;
            col.Header              = headerAndTag;
            col.Tag                 = headerAndTag;
            col.DataMemberBinding   = new Binding(bindText) { Mode = BindingMode.TwoWay };
 
            col.Footer = sp;
            return col;
        }

My question is: Is there a better way to achieve this ? Should I perhaps use other things than TextBox ?
Can someone give me some tips.

Thank you.
Kristján
Vlad
Telerik team
 answered on 07 Feb 2012
1 answer
146 views
I am working on a program with a lot of difficult users (who doesn't ;-)

In my program, there is a worklist with a column containing next contact date (time is optional). This is a RadDateTimePicker.

Some of my users wants to be able to input time and others wants to be able to input only dates. The latter group of users complains that the time part ('00:00') makes i harder to read the date.

Is there a way to make RadDateTimePicker show only the date part, if no time-part has been entered?

I work in a multi-cultural environment, I cannot use stuff like "{0:HH:mm}, but I do use stuff like {0:d}

Thanks
Yana
Telerik team
 answered on 07 Feb 2012
3 answers
296 views
Hi,
I am new to the RadRadialGauge,

I tried to create a Radial Gauge like explain in the site.

i have added the two dll:
  • Telerik.Windows.Controls.DataVisualization.dll
  • Telerik.Windows.Controls.dll
and the namespace:
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

my xaml look like this:
<Window x:Class="Guage.MainWindow"
        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"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <telerik:RadRadialGauge x:Name="radialGauge"
                        Width="300"
                        Height="300">
        </telerik:RadRadialGauge>
    </Grid>
</Window>

I am getting an error when i am compiling the project:
"The tag 'RadRadialGauge' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. Line 7 Position 10."
"The type 'telerik:RadRadialGauge' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built."

What am i doing wrong?
Thanks,

Andrey
Telerik team
 answered on 07 Feb 2012
2 answers
125 views

I'd like to group some properties in one node with general name. I do e.PropertyDefinition.GroupName = "Name" in AutoGeneratingPropertyDefinition(), but... nothing!

Can you write code of sample?

Daenur
Top achievements
Rank 1
 answered on 07 Feb 2012
1 answer
115 views
My application will be running on a laptop with a touch screen, which will be mounted in a police car and used by the officer while driving.  To make things easy on him/her, I'm making the controls large so they'll find the fingers of people with sausage fingers, like my own.

I'm using a MaskedDateTimeInput control on one screen for entering a TimeSpan.  This is going inside of a UserControl with two large RepeatButtons, one with an arrow pointing up and one with an arrow pointing down.  The idea is that the user will tap the screen in the MaskedDateTimeInput control, say in the seconds area.  The user can then tap or hold the RepeatButton with the Up arrow and I want the MaskedDateInput control to treat it as though the user had pressed the up arrow key on the keyboard.  The same goes for the RepeatButton with the down arrow acting like the user had pressed the down arrow key on the keyboard.

How can I get this functionality to work?  There must be some kind of a WPF command defined by the control but I don't know where to find it. 

Also, is it possible to specify how much one press of the up or down arrow key will change the value of the part of the time span it's in?

Tony
Petar Mladenov
Telerik team
 answered on 07 Feb 2012
2 answers
385 views
Hi guys,

I have the latest production version. I'm applying styles with (for example):

Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Telerik.Windows.Controls.Office_SilverTheme();

However this seems to only change my RadGridView. Everything else is default.

If I go into my Telerik installation folder, there's the handy sample project with all the xaml for the themes. I notice that these include styling for standard windows controls, so why doesn't it work?

And as a side issue, how come most of the sample theme xaml files are missing for Office Black?


Travis
Top achievements
Rank 1
 answered on 07 Feb 2012
4 answers
270 views
Hi There,

I am having quite a baffling issue and I am wondering if anyone can help. I am using a trial version of 'RadControls for WPF Q2 2011' in my WPF application, but every time I try adding a RadChart to my UserControl, it gives me the following (quite unexpected) error:

NotImplementedException was unhandled by user code
The method or operation is not implemented.
Source: PresentationFramework
Stack Trace: 
   at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
   at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
   at System.Windows.Baml2006.Baml2006SchemaContext.GetProperty(Int16 propertyId, XamlType parentType)
   at System.Windows.Baml2006.Baml2006Reader.Process_PropertyArrayStart()
   at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
   at System.Windows.Baml2006.Baml2006Reader.ReadObject(KeyRecord record)
   at System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
   at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.FetchResource(Object resourceKey, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.LookupResourceInDictionary(ResourceDictionary dictionary, Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
   at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
   at System.Windows.FrameworkElement.OnInitialized(EventArgs e)
   at Telerik.Windows.Controls.Charting.ChartArea.OnInitialized(EventArgs e)
   at System.Windows.FrameworkElement.TryFireInitialized()
   at System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent)
   at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent)
   at System.Windows.Media.Visual.AddVisualChild(Visual child)
   at System.Windows.FrameworkElement.set_TemplateChild(UIElement value)
   at System.Windows.Controls.ContentPresenter.UseContentTemplate.BuildVisualTree(FrameworkElement container)
   at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.RadDockPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.Charting.ScalePanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at Telerik.Windows.Controls.RadChart.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   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.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.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   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.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 TACSDashboardShell.App.Main() in C:\TFS\TACSDashboardSln\TACSDashboardShell\obj\Debug\App.g.cs:line 50
   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()

Can anyone offer any help with this one? Why would it throw a NotImplementedException?

FYI, I am also using Prism and MEF.

Thanks

Kevin Parkinson
Edmonton AB Canada
Tony
Top achievements
Rank 1
 answered on 06 Feb 2012
0 answers
222 views

Hi guys,

 

I’ve developing using RadControls for WPF Q3 2011 SP1 (part of the Premium Collection) and looking specifically at the RadWindow control. I like the changes you’ve made over the last few releases but I have a few questions:

 

  • The fade in/fade out animation looks good when executed both as a WPF Windows app and as an XBAP run in IE (full trust) however do you provide alternative animations? I’m trying to implement something along the lines of the window width & height starting of as zero in size and then the RadWindow resizes from the centre of the screen when shown - Hope that makes sense. Can you suggest something/perhaps provide an example how this could possibly be acheived?

 

  • The ModalBackground property seems to only work when running via an XBAP, is this deliberate? I have all code in a common class library and when called from an XBAP the ModalBackground property takes effect when the RadWidow is shown however, from a Desktop WPF application it seems to have no effect. Am I missing something?

 

  • Although the RadWindow is customizable I may need to customise it further by modifying the DocumentTemplate. I have no idea how to do this and looking through your online help I couldn’t find an example. Can you oblige?

 

Thanks

Mike.

Michael
Top achievements
Rank 1
 asked on 06 Feb 2012
1 answer
175 views
Hi, Are there any examples in the documentation which show how threading with the Chart works?

Specifically, my issue is that I have a long loop which adds "Coordinate" objects to an ObservableCollection which is set as the ItemsSource of some ScatterSeries. Assume that this loop takes minutes to complete, as I add a Thread.Sleep(1000) for each iteration. Importantly, I would like the chart to display each "Coordinate" object as and when it is added to the ObservableCollection, without seizing up the whole chart.

I have followed some examples of creating a Dispatcher, however this appears to have no effect. Example code of what I am trying to achieve:

private ObservableCollection<Coordinate> coordinates = new ObservableCollection<Coordinate>();
private Queue<Coordinate> coordinatesQueue = new Queue<Coordinate>();
 
private void FillQueue()
{
    .
    .
    .
}
 
private void UpdateChart()
{
    SomeScatterSeriesinChart.ItemsSource = coordinates;
    this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
        (ThreadStart) delegate()
                {
                    while (coordinatesQueue.Count != 0)
                    {
                        coordinates.Add(coordinatesQueue.Dequeue());
                        Thread.Sleep(1000);
                    }
                }
    );
}


Thanks for any help in advanced!
Giuseppe
Telerik team
 answered on 06 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?