Telerik Forums
UI for WPF Forum
2 answers
117 views
Hello,

I am just now using the Telerik controls in a WPF project and I tried to use the TreeView control, but it throws an error that says a XamlParseException occurred.  I have tried a couple of different controls, and none of them appear to work.

Generally, I get the following error: xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

Am I forgetting a using somewhere?

Thank You,

Ron
Tina Stancheva
Telerik team
 answered on 05 May 2011
0 answers
177 views
Hello,

I have a list as a datasource for my Combobox. Whenever the DataSource has an empty value my data trigger inserts the template seen in XAML below. This works perfectly and inserts my separator and radbutton into the combolist as a comboboxitem.

<ComboBox Name="cmbo_NewSME" SelectedValue="You can begin typing the name here..." Height="25" Width="300" Margin="5,6,5,0" Loaded="cmbo_NewSME_Loaded" SelectionChanged="cmbo_NewSME_SelectionChanged">
    <ComboBox.ItemContainerStyle>
        <Style TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
            <EventSetter Event="PreviewMouseLeftButtonDown" Handler="PreviewMouseLeftButtonDown" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding Path=AD_FullName}" Value="">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ComboBoxItem}">
                                <StackPanel Name="FullUsrListWrap" Visibility="Visible" Width="300">
                                    <Separator Name="FullList" Margin="0,10,0,5" Height="10" Width="300"/>
                                    <telerik:RadButton Name="ShowAllUsrs" Width="220" Height="20" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,5" Content="Show All Authorize-IT Users..." />
                                </StackPanel>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </ComboBox.ItemContainerStyle>
</ComboBox>

The problem is that I am unable to handle any RadButton events. As you can see above the EventSetter is at the combobox level and while this works I have to first decipher if the person actually selected a username or the "Show More..." button. So I experimented and thought about an EventSetter at the Radbutton level but I keep getting an error.
Everything is same as above except:
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
   <StackPanel Name="FullUsrListWrap" Visibility="Visible" Width="300">
      <Separator Name="FullList" Margin="0,10,0,5" Height="10" Width="300"/>
         <telerik:RadButton Name="ShowAllUsrs" Width="220" Height="20" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,5" Content="Show All Authorize-IT Users...">
            <Style>
               <EventSetter Event="Click" Handler="Click" />
            </Style>
         </telerik:RadButton>
   </StackPanel>
</ControlTemplate>

I keep getting the property Content is set more than once.....but it isn't or I'm overlooking something VERY obvious.

So the error aside what I am after is handling the button click event which may or may not be possible cause it's "disguised" as a ComboboxItem....??

Thanks
JB
Ramjet
Top achievements
Rank 1
 asked on 05 May 2011
6 answers
357 views

Hi,

I'm using ScheduleView to load custom appointments with the Load on demand features. The appointments load fine, but whenever I scroll backward or forward in time (e.g. previous/next week or month) the calendar scrolls back to the top, instead of staying at the time it was scrolled to before navigation.

This also occurs in the RadControls demo; just navigate to Controls -> Data -> Schedule View -> Features -> Load On Demand. Now click Week view. Scroll down to 18:00. Now click the right arrow to navigate to next week. The view scrolls back to the top at 0:00.

Any ideas on how to fix this? I found no method to manually get and set the scrolling position either.

Rosi
Telerik team
 answered on 05 May 2011
4 answers
318 views
I have been looking and trying for hours to print a telerik gridview. I succeeded in printing, in about the same way as described at http://blogs.telerik.com/vladimirenchev/posts/09-12-28/how_to_easy_print_and_print_preview_with_radgridview_for_wpf.aspx, but this causes the last row on each page to be splitted in half. The upper part of the row is at the end of page 1 and the lower part of that row is at the beginning of page 2. This is unacceptable.

How can I print the gridview in a decent way, without rows being splitted over two pages?
Ludwig
Top achievements
Rank 1
 answered on 05 May 2011
5 answers
120 views
 

Hello,


I don't speak English very well, but I have a question about the API WPF Telerik.


I would like to know if it's possible to draw on charts?


The user must be able to draw a rectangle on a scatter series using the mouse.


This rectangle will be modified in width. The height will be automatically adjusted based on the average of selected points in the rectangle.


We would like to know if this is feasible or not via the API WPF Telerik and if so using what events?


Best regards,

Mickael
Top achievements
Rank 1
 answered on 05 May 2011
1 answer
59 views
Sorry guys, as it turns out someone had forgotten to put Mode=TwoWay in our control wrapper's consumer code.
Maya
Telerik team
 answered on 05 May 2011
1 answer
162 views
Hi!
We're testing telerik maps trying to know if we can develop our requirements with them. We have found an error / incompatibility that we can not understand. We installed Dbf Viewer 2000 (trial) because we need to modify DBF files.
Dbf Viewer 2000 creates an association to Dbf Files that causes telerik maps (the ones that use data source files) to crash. The exception is this:

No se controló System.ArgumentException
  Message=Un símbolo (token) no es válido. Consulte RFC 2616 para corregir el tipo de gramática o contenido.
  Source=WindowsBase
  StackTrace:
StackTrace:
       en MS.Internal.ContentType.ValidateToken(String token)
       en MS.Internal.ContentType.ParseTypeAndSubType(String typeAndSubType)
       en MS.Internal.ContentType..ctor(String contentType)
       en MS.Internal.MimeTypeMapper.GetMimeTypeFromUrlMon(Uri uriSource)
       en MS.Internal.MimeTypeMapper.GetMimeTypeFromUri(Uri uriSource)
       en MS.Internal.AppModel.ResourcePart.GetContentTypeCore()
       en System.IO.Packaging.PackagePart.get_ContentType()
       en MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
       en System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
       en System.IO.Packaging.PackagePart.GetStream()
       en System.Windows.Application.GetResourceStream(Uri uriResource)
       en Telerik.Windows.Controls.Map.MapShapeReader.ReadData(Uri dataUri, ShapeReaderStatus userState)
       en Telerik.Windows.Controls.Map.MapShapeReader.Read(Uri uri, Uri dataUri)
       en Telerik.Windows.Controls.Map.MapShapeReader.Read()
       en Telerik.Windows.Controls.Map.MapShapeReader.StartRead()
       en System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       en MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       en System.Windows.Threading.DispatcherOperation.InvokeImpl()
       en System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       en System.Threading.ExecutionContext.runTryCode(Object userData)
       en System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       en System.Windows.Threading.DispatcherOperation.Invoke()
       en System.Windows.Threading.Dispatcher.ProcessQueue()
       en System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       en MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       en MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       en System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       en MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       en System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       en MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       en MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       en System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       en System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       en System.Windows.Threading.Dispatcher.Run()
       en System.Windows.Application.RunDispatcher(Object ignore)
       en System.Windows.Application.RunInternal(Window window)
       en System.Windows.Application.Run(Window window)
       en System.Windows.Application.Run()
       en XXXXXXXXXXXXXXXXXXXXXX.App.Main() en XXXXXXXXXXXXXXXXXXXXXX\obj\x86\Debug\App.g.cs:línea 0
       en System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       en System.Threading.ThreadHelper.ThreadStart()

We have found that this is happening only when relative uri to resource is used. If we remove folder .dbf in HKEY_CLASSES_ROOT of registry maps don't crash.

We can not use absolute paths and we can not control the software installed on client's computers so there is a risk that maps crashes with any software doing the same with data source files.

You can try this with telerik demos.
Andrey
Telerik team
 answered on 05 May 2011
1 answer
181 views
Hi,

I have a grid like:

<telerik:RadGridView Name="patientsGridView" SelectionMode="Extended" ItemsSource="{Binding Patients}" SelectedItem="{Binding SelectedPatient}" AutoGenerateColumns="False" IsReadOnly="True" MouseDoubleClick="patientsGridView_MouseDoubleClick" RowIndicatorVisibility="Collapsed" SelectionChanged="patientsGridView_SelectionChanged" GroupPanelStyle="{DynamicResource GridViewGroupPanelStyle1}" >                      
    <telerik:RadGridView.Columns>

<!-- IsActiveGroup -->
<telerik:GridViewDataColumn DataMemberBinding="{Binding IsActiveGroup}" >
<telerik:GridViewDataColumn.FilteringControl>
<GridView:FilteringControl Style="{DynamicResource FilteringControlStyle}"/>
</telerik:GridViewDataColumn.FilteringControl>
<telerik:GridViewDataColumn.Header>
<TextBlock Text=" " ToolTip="{lex:LocText S3.ParametersUE.PatientManagement:UIStrings:PatientListView_PatientGridColumnIsActiveToolTip}"/>
</telerik:GridViewDataColumn.Header>
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<Image Source="{Binding Path=IsActiveImageSource, Converter={StaticResource imgConverter}}" Stretch="UniformToFill" RenderOptions.BitmapScalingMode="HighQuality" Width="20" Height="20" ToolTip="{Binding IsActiveGroup}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
 <!-- HasWarningGroup -->
<telerik:GridViewDataColumn DataMemberBinding="{Binding HasWarningGroup}" >
<telerik:GridViewDataColumn.FilteringControl>
<GridView:FilteringControl Style="{DynamicResource FilteringControlStyle}"/>
</telerik:GridViewDataColumn.FilteringControl>
<telerik:GridViewDataColumn.Header>
<TextBlock Text=" " ToolTip="{lex:LocText S3.ParametersUE.PatientManagement:UIStrings:PatientListView_PatientGridColumnHasWarningToolTip}"/>
</telerik:GridViewDataColumn.Header>
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<Image Source="{Binding Path=HasWarningImageSource, Converter={StaticResource imgConverter}}" Stretch="UniformToFill" RenderOptions.BitmapScalingMode="HighQuality" Width="20" Height="20" ToolTip="{Binding HasWarningGroup}" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

etc...

I need the width of the grid - but ActualWidth is always 0. How can I get the width of the grid?





Ivan Ivanov
Telerik team
 answered on 05 May 2011
1 answer
47 views
Hello everybody,

is there a way to identify the RadPaneGroup which is positioned in the lower left corner of the docking area? In my application this is the place where dynamically added pane should be shown.

I already read in another thread that the method RadDocking.GetDockState does not work properly.

Kind regards

Uli
George
Telerik team
 answered on 05 May 2011
1 answer
95 views
Hi there,
    I am looking for a way to bind a collection of objects inside a TreeListView Grid column. I am able to bind to all of the objects in my hierarchy and have them displayed correctly in the TreeListView Grid. My Object model is something like this

NoteObject
        Text
        DateCreated
        DateModified
        Collection of Sub Notes ( of type Note )
        Collection of Flag Objects

Flag Object
       text
        type
    

The TreeListView Grid correctly displays the object hierarchy but I do not seem to be able to bind to the collection of Flag Objects. I would also like to use a converter on the Flag objects to change the background color of the cell based on the Flag Type. Could you send me an example of how to do this?

Thanks
Ivan Ivanov
Telerik team
 answered on 05 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?