Telerik Forums
UI for WPF Forum
3 answers
160 views
I am unable to get Autocomplete and filteringmode working together. I would like to have a FilteringMode of startswith and still have autocomplete. As soon as I set a filteringmode AutoComplete no longer works. Any solutions would be appreciated. (q2 2209 release)
Konstantina
Telerik team
 answered on 19 Mar 2012
0 answers
94 views
Hi @ All,

is there any tutorial how to bind a viewmodel to a TimeBar + ScheduleVIew? In the Demo of telerik there is the DataContext generated in xaml.

<UserControl.DataContext>
    <example:RandomGeneratorViewModel RandomSeed="123" StartTime="1/1/2011 12:00:00 AM"
            EndTime="12/31/2011 11:59:59 PM" CurrentTime="6/5/2011 10:00:00 AM">
        <example:RandomGeneratorViewModel.Lipsum>Pellentesque dapibus congue neque, eu bibendum dui elementum sed. Integer porta suscipit venenatis. Quisque gravida, est in eleifend dignissim, sapien dui euismod erat, pulvinar eleifend leo risus sit amet massa. Suspendisse sit amet metus ut lorem hendrerit molestie sed eu justo. Mauris eu tristique ipsum. Vivamus sodales venenatis nibh quis suscipit. Nulla facilisi. Pellentesque purus risus, hendrerit at venenatis sit amet, fringilla et arcu. Donec luctus tincidunt iaculis. Integer sapien tortor, lacinia et mattis vitae, facilisis at massa. Vestibulum scelerisque euismod posuere. Etiam sed velit non velit hendrerit rutrum eget sed risus. Nullam blandit congue dapibus. Nullam risus velit, pretium vel pretium eu, bibendum in urna. Fusce non nulla eros, eu placerat mauris. Aenean lobortis vehicula mi, ac molestie nisi ornare dictum. Etiam nec dolor nisi. Mauris eleifend lacus vitae felis eleifend eget fringilla sem ultricies. Duis hendrerit dapibus consectetur. Phasellus ac lacus felis, quis pharetra risus. Donec enim magna, sollicitudin vitae dignissim sed, scelerisque quis leo. In hac habitasse platea dictumst. In eu purus augue, vel scelerisque velit. Vivamus nec magna ipsum. Donec porta tellus ac arcu congue pulvinar. Maecenas non tortor orci. In eu erat justo, ac pellentesque urna. Mauris rutrum arcu quis dui tincidunt semper. Aliquam ullamcorper nunc est. Proin suscipit faucibus varius. Quisque suscipit felis ut dolor rutrum convallis. In felis augue, interdum consequat lacinia id, dictum sit amet nisl. Vivamus adipiscing sodales quam, et suscipit mi adipiscing sollicitudin. Vestibulum volutpat dui in massa scelerisque accumsan. Proin ac odio non nisi ornare semper. Morbi sapien ante, pulvinar quis lobortis in, viverra porttitor lorem. Aenean pellentesque euismod risus eu porttitor. Donec lobortis volutpat suscipit.</example:RandomGeneratorViewModel.Lipsum>
        <example:RandomGeneratorViewModel.Controls>RadComboBox, RadScheduleView, RadNumericUpDown, RadGridView, RadDocking, RadWindow, RadCharting, RadTimeBar, RadPanelBar, RadRibbonView, RadExpander</example:RandomGeneratorViewModel.Controls>
        <example:RandomGeneratorViewModel.Actions>Bug, Feature, Help Article, Forum Post, Unit Test</example:RandomGeneratorViewModel.Actions>
        <example:RandomGeneratorViewModel.ResourceTypes>
            <telerik:ResourceType Name="Developer" DisplayName="Developer">
                <telerik:Resource DisplayName="John" ResourceName="John" />
                <telerik:Resource DisplayName="Smith" ResourceName="Smith" />
                <telerik:Resource DisplayName="Bella" ResourceName="Bella" />
                <telerik:Resource DisplayName="Bob" ResourceName="Bob" />
                <telerik:Resource DisplayName="Patrick" ResourceName="Patrick" />
                <telerik:Resource DisplayName="Simone" ResourceName="Simone" />
                <telerik:Resource DisplayName="Mike" ResourceName="Mike" />
                <telerik:Resource DisplayName="Jane" ResourceName="Jane" />
            </telerik:ResourceType>
        </example:RandomGeneratorViewModel.ResourceTypes>
    </example:RandomGeneratorViewModel>
</UserControl.DataContext>

How do i transfer this to a dynamic Databin? Problem is how to set the ResourceType and the Resource?! Background. I want to load the data from sqlite-database. Each Customer is a Resource. n the future i want to use 3 ResourceTypes with n Resources!

Thanks
WW
ITA
Top achievements
Rank 1
 asked on 19 Mar 2012
0 answers
78 views
HI @ All,

how do i set the DateTime for a RadTimeBar in my code behind? How should this look like correctly?

-solved !!! Thanks

Thanks
WW
ITA
Top achievements
Rank 1
 asked on 19 Mar 2012
1 answer
88 views
I'm developing a project with ScheduleView. When I click "New Appointment" RibbonButton, a RadWindow named " Appointment - Untitled" was opened. Then my question is, how can I modify these text(or content) of controls on the windows, because I want to make the project into multiple languages.

Thanks.

Emiya
tanxx@e-glad.com.cn
2012/03/15
Konstantina
Telerik team
 answered on 19 Mar 2012
3 answers
331 views

Good morning,

I'm trying to bind a FilterDescriptor value to the tag value of a treeview item. Is this possible?

I have the following code but it doesn't work:

<telerikData:FilterDescriptor Member="ParkID" Operator="IsEqualTo" Value="{Binding ElementName=treeParks, Path=SelectedItem.Tag}" />

Thank you for your time,

Rob

Dimitrina
Telerik team
 answered on 19 Mar 2012
1 answer
106 views
I need to bind this document to the RadGridView and have a child data template for each row where the parametercollection node exists.  

<!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) -->
<MethodInformation>
    <tenantid>0</tenantid>
    <namespaceName>BusinessServer.BusinessPolicies.ServiceContractsComponent</namespaceName>
    <className>ServiceContractsBusPolicyMgr</className>
    <methodName>ExtractVouchersAndPostToInvoice</methodName>
    <runAsynchronously>Y</runAsynchronously>
    <autoRestart/>
    <parameters>
        <parameter>
            <name>contractsequencein</name>
            <value/>
        </parameter>
        <parameter>
            <name>subsequencein</name>
            <value/>
        </parameter>
        <parameter>
            <name>billingdatein</name>
            <value/>
        </parameter>
        <parameter>
            <name>requestclosedatein</name>
            <value/>
        </parameter>
        <parameter>
            <name>additionalparametersin</name>
            <parametercollection>
                <parameter>
                    <name>tablename</name>
                    <value/>
                    <name>columnname</name>
                    <value>posting_group</value>
                    <name>columnvalue</name>
                    <value>KL</value>
                </parameter>
            </parametercollection>
        </parameter>
        <parameter>
            <name>theplaceidtobillin</name>
            <value/>
        </parameter>
        <parameter>
            <name>theinvoiceconsolidationruleidin</name>
            <value/>
        </parameter>
    </parameters>
</MethodInformation>

The following code (where strXml variable is the xml as string above) doesn't support viewing the parameters inside of parametercollection element.

                  
XmlDataProvider xProviderResource =
new XmlDataProvider();
XmlDocument xParameterDoc =
new XmlDocument();
xParameterDoc.LoadXml(strXml);      
xProviderResource.IsAsynchronous =
false;          
xProviderResource.Document = xParameterDoc;    
xProviderResource.XPath =
"MethodInformation/parameters/parameter";  
IEnumerable<XmlNode> iXnodeEnum = xProviderResource.Data
as IEnumerable<XmlNode>;
ObservableCollection<XmlNode> obsElementCollection =
new ObservableCollection<XmlNode>(iXnodeEnum);
radGridView2.ItemsSource = obsElementCollection;

We have an ID with telerik support. My company purchased both WPF and ASP.NET AJAX controls.  If someone can provide an email address I will send the ID directly to them so I can get a higher priority support.  

Dan
Pavel Pavlov
Telerik team
 answered on 19 Mar 2012
1 answer
172 views
Was working with some data and I noticed some bug when the YValue of a point is negative while the minimum of an axis is positive.

I made a demo to reproduce the bug

xaml:
<Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
         
        <telerik:RadChart ItemsSource="{Binding Points}" >
            <telerik:RadChart.DefaultView>
                <telerik:ChartDefaultView>
                    <telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartLegend Visibility="Collapsed"/>
                    </telerik:ChartDefaultView.ChartLegend>
                    <telerik:ChartDefaultView.ChartArea>
                        <telerik:ChartArea >
                            <telerik:ChartArea.AxisX>
                                <telerik:AxisX MinValue="{Binding MinX}" MaxValue="{Binding MaxX}" AutoRange="False" Step="{Binding StepX}" />
                            </telerik:ChartArea.AxisX>
                            <telerik:ChartArea.AxisY>
                                <telerik:AxisY MinValue="{Binding MinY}" MaxValue="{Binding MaxY}" AutoRange="False" Step="{Binding StepY}" StripLinesVisibility="Collapsed"/>
                            </telerik:ChartArea.AxisY>
                        </telerik:ChartArea>
                    </telerik:ChartDefaultView.ChartArea>
                </telerik:ChartDefaultView>
            </telerik:RadChart.DefaultView>
            <telerik:RadChart.SeriesMappings>
                <telerik:SeriesMapping LegendLabel="Line">
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:LineSeriesDefinition ShowItemLabels="False">
                            <telerik:LineSeriesDefinition.Appearance>
                                <telerik:SeriesAppearanceSettings>
                                    <telerik:SeriesAppearanceSettings.PointMark>
                                        <telerik:PointMarkAppearanceSettings Shape="Diamond" />
                                    </telerik:SeriesAppearanceSettings.PointMark>
                                </telerik:SeriesAppearanceSettings>
                            </telerik:LineSeriesDefinition.Appearance>
                        </telerik:LineSeriesDefinition>
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:SeriesMapping.ItemMappings>
                        <telerik:ItemMapping FieldName="Item1" DataPointMember="XValue"/>
                        <telerik:ItemMapping FieldName="Item2" DataPointMember="YValue"/>
                    </telerik:SeriesMapping.ItemMappings>
                </telerik:SeriesMapping>
                <telerik:SeriesMapping LegendLabel="Line">
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:LineSeriesDefinition ShowItemLabels="False">
                            <telerik:LineSeriesDefinition.Appearance>
                                <telerik:SeriesAppearanceSettings>
                                    <telerik:SeriesAppearanceSettings.PointMark>
                                        <telerik:PointMarkAppearanceSettings Shape="Diamond" />
                                    </telerik:SeriesAppearanceSettings.PointMark>
                                </telerik:SeriesAppearanceSettings>
                            </telerik:LineSeriesDefinition.Appearance>
                        </telerik:LineSeriesDefinition>
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:SeriesMapping.ItemMappings>
                        <telerik:ItemMapping FieldName="Item1" DataPointMember="XValue"/>
                        <telerik:ItemMapping FieldName="Item4" DataPointMember="YValue"/>
                    </telerik:SeriesMapping.ItemMappings>
                </telerik:SeriesMapping>
            </telerik:RadChart.SeriesMappings>
        </telerik:RadChart>
         
        <Slider Grid.Row="1" Value="{Binding MinY, Mode=TwoWay}" Minimum="-10" Maximum="10" SmallChange=".5" LargeChange="5"/>
    </Grid>

ViewModel:
public class ViewModel : INotifyPropertyChanged
    {
 
        private double _minY = -10;
        private double _maxY = 50;
        private double _stepY = 10;
 
        private double _minX = 0;
        private double _maxX = 50;
        private double _stepX = 10;
 
        public ViewModel()
        {
            MaxY = 50;
            StepY = 10;
            MinX = 0;
            MaxX = 50;
            StepX = 10;
 
            Points = new ObservableCollection<Tuple<double, double, double, double>>();
 
            Random r = new Random();
 
            Points.Add(Tuple.Create(.1, -8d, 1d, 5d));
 
            for (double i = 20; i < 50; i += 4)
            {
                Points.Add(Tuple.Create(i, i - 8, (i - 5) + (r.NextDouble() * 9 - 4.5), i - 25));
            }
        }
 
        public ObservableCollection<Tuple<double, double, double, double>> Points { get; private set; }
 
        public double MinX { get; private set; }
 
        public double MaxX { get; private set; }
 
        public double StepX { get; private set; }
 
        public double MinY
        {
            get
            {
                return _minY;
            }
            set
            {
                _minY = value;
                OnPropertyChanged("MinY");
            }
        }
 
        public double MaxY { get; private set; }
 
        public double StepY { get; private set; }
 
        protected void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
            }
        }
 
        public event PropertyChangedEventHandler PropertyChanged;
    }



The slider bar changes the Minimum of the AxisY and as soon as the minimum hit 0, you can see that the line are now rendered as if the YValue of the point was 0.
Nikolay
Telerik team
 answered on 19 Mar 2012
1 answer
56 views
I posted the following in PITS, but I wanted to also post it here in hopes of finding an easy workaround or some sort of temporary solution to my problem.

If the first PanelBarItem has ever been expanded, selecting the second of the two identical children causes the first child to be selected instead. This is easily demonstrated with the following example:

       <telerik:RadPanelBar Height="200">
                <telerik:RadPanelBarItem Header="Parent A">
                    Child
                </telerik:RadPanelBarItem>
                <telerik:RadPanelBarItem Header="Parent B">
                    Child
                </telerik:RadPanelBarItem>
       </telerik:RadPanelBar>

This is just a simple example, but it happens independent of the number of RadPanelItems or children that exist; when the second of two identical children is selected the result will be that the first child is selected.

Any ideas?
Petar Mladenov
Telerik team
 answered on 19 Mar 2012
0 answers
378 views

while working with the Q3 11 controls, everything worked well with draging from the TreeView.

The current scenario is that we allow reordering of tree items, but we also allow dragging outside the tree.
When the dragged treeview item is being dragged over a specific control, we cancel the drag using:

 

Telerik.Windows.DragDrop.DragDropManager.AddQueryContinueDragHandler(solutionTree, solutionTree_QueryContinueDrag);

And then in the QueryContinueDrag do:

e.Action = DragAction.Cancel;

e.Handled = true;


And call (with a BeginInvoke) to a function on my classes that starts a DragDrop (using microsoft drag drop) with my own UI.


The exception happens after the drop.

All signs point to the fact that the exception comes from your code.


This is the stack stace:
   at MS.Win32.UnsafeNativeMethods.DoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   at System.Windows.OleServicesContext.OleDoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   at System.Windows.DragDrop.OleDoDragDrop(DependencyObject dragSource, DataObject dataObject, DragDropEffects allowedEffects)
   at System.Windows.DragDrop.DoDragDrop(DependencyObject dragSource, Object data, DragDropEffects allowedEffects)
   at Telerik.Windows.DragDrop.DragDropManager.DoDragDrop(DependencyObject dragSource, Object data, DragDropEffects allowedEffects, DragDropKeyStates initialKeyState, Object dragVisual, Point relativeStartPoint, Point dragVisualOffset)
   at Telerik.Windows.DragDrop.DragInitializer.StartDrag()
   at Telerik.Windows.DragDrop.DragInitializer.StartDragPrivate(UIElement sender)
   at Telerik.Windows.DragDrop.DragInitializer.DragSourcePreviewMouseMove(Object sender, MouseEventArgs e)
   at System.Windows.Input.MouseEventArgs.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.RaiseTrustedEvent(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, WindowMessage 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, 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.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at Unitronics.Shell.UI.App.Main() in C:\Users\itais\Desktop\NG\NG Projects\Sources\Unitronics.Shell\Unitronics.Shell.UI\obj\Debug\App.g.cs:line 0
   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()




A similar problem was reported here:http://www.telerik.com/community/forums/wpf/draganddrop/app-crash-when-dropping-into-wordpad.aspx


Please fix it, or suggest a fix ASAP.

Thanks.

 

 

 

 

 

 

 

 

itai
Top achievements
Rank 1
 asked on 18 Mar 2012
0 answers
118 views
Hello. I have som trouble with dynamic create DataTemplate.
FrameworkElementFactory column = new FrameworkElementFactory(typeof(GridViewDataColumn));
and i need set DataMemberBiding on this column,
so usually I use somthing like this
column.SetValue(Telerik.Windows.Controls.GridViewDataColumn.DataMemberBidingProperty, object myObject);
but I can't found DataMemberBidingProperty. 
What can I use instead?
Anton
Top achievements
Rank 1
 asked on 17 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?