Telerik Forums
UI for WPF Forum
3 answers
174 views
Your have a fantastic suite of products.  Congrats from a 35 year veteran of application development (think COBOL)...    Your documentation/examples are prolific and very helpful, but as a relative newcomer to both WPF/XAML (as well as Telerik)  I am having a hard time using many of the code samples in conjunction with others.  Some are operating in different contexts from others and have underlying schemes using seemingly incompatible techniques.   Not a criticism, but trying to be helpful to your already excellent support. 

I'm trying to do 3 things, and I've at least attempted to build and execute the following examples ( as well as several from the awesome Demo UI). Although I've been able to produce all of these individually from demo/sample code, I have not been able to combine them all successfully to meet my requirements.  

http://www.telerik.com/forums/locate-a-shape-and-change-size-according-to-zoom-level
http://docs.telerik.com/devtools/wpf/controls/radmap/features/visualization-layer/shape-appearance.html
http://docs.telerik.com/devtools/wpf/controls/radmap/features/visualization-layer/virtualization.html
http://docs.telerik.com/devtools/wpf/controls/radmap/features/visualization-layer/heatures-clustering.html
http://docs.telerik.com/devtools/wpf/controls/radmap/features/visualization-layer/data-binding.html
http://docs.telerik.com/devtools/wpf/controls/radmap/features/visualization-layer/map-shape-data.html

What I'm trying to do is 
  * Use C# code to build the list of items to render.  Most sample code has hard coded items (ellipses, rectangles, pin points, etc)  , and when I introduce DataContext and ItemTemplate And ItemsSource, and Resource etc, either the xaml pre-processing in VS design time throws errors or the executing code doesn't work. 
  * I need to use the virtualization techniques so that at low zoom levels, the user can see shapes (ellipses), and when zooming in, the shapes remain the same size on the screen, i.e. don't end up being bigger than entire cities.  (http://www.telerik.com/forums/locate-a-shape-and-change-size-according-to-zoom-level) 
  * I need to be able to respond to a user click on a shape and change the appearance to be "selected", i.e. HighlightShapeFill  using the method in http://docs.telerik.com/devtools/wpf/controls/radmap/features/visualization-layer/shape-appearance
  * I'm also probably going to need clustering, but I haven't tried messing around with that concept yet.

I'm not sure what code to post for you to review ... I've got all of this stuff working individually,  I haven't been able to combine them into a single code base. 

Our basic architecture and business is: 
  * The Map control has a VisualizationLayer, and the code behind assigns the ItemsSource to a public property (ObservableCollection of "MapItems")  in the constructor.  This collection get added to no problem, the shapes show up as expected on the map.
  * There are a number of different types of items to render, each type will has a set of appearance attributes as defined in a database, such as fill color, stroke color, size, and in some cases perhaps shape (ellipses vs. square, vs polygon, etc)  
  * When user asks for "nodes" to be placed on map, the C# code creates a new  "MapItem" object with appropriate properties, adds it to the collection of MapItems which are the ItemsSource to the VisualizationLayer.  In the current set up the layer has an ItemTemplate which has a DataTemplate, which binds to MapItem properties for color, size etc.   This works fine by itself.   It's just when I try to bring in the ShapeFill (Highlighted) stuff, and the Virtualization stuff .. nothing works .. at all. 

p.s. thanks for putting up with all of us English speakers and for showing you own neighborhood in many of the examples.  We here in the U.S. need that ;=)  .. badly.  Any hints would be most appreciated. 

благодаря

NOTE:  As it is, we are not able to effectively use INotify in .Net to truly bind WCF UI components.  We are running under some higher level Microsoft frameworks that seem to be interfering (Prism).  So for now all of our code has to run in the code behind, constantly resetting DataContexts and ItemsSources to refresh the UI... ugly, yes, and hopefully resolved before too long. ;-)












Rajinder
Top achievements
Rank 1
 answered on 10 Apr 2015
3 answers
257 views
Hello everybody,
is it possible to define dynamic pages on the RadWizard Control or create the pages based on a List/Observable collection?

I would like, based on a property, to create or skip the WizardPages...

Many thanks for the answer
Dino
Stefan
Telerik team
 answered on 09 Apr 2015
1 answer
135 views

This is a usability issue with the Wizard. 

 I think it would be better to have the Finish button where the Cancel button currently is on the last page of the Wizard.

 This is because users (and I certainly do) will mistakenly tend to click in the same place as Next to complete what they have been doing, only to find that they have actually cancelled the wizard and possibly lost all their processing.

 

This would also make the Telerik wizard consistent with other kinds (e.g. Installation wizards).

 

 

 

Yoan
Telerik team
 answered on 09 Apr 2015
1 answer
57 views

Hi,

 Suppose that I want to implement custom IAppointment, IRecurrenceRule, IExceptionOccurrence. (for database purpose for sample like explain in your documentation). I don't want inherited from telerik class but implement myself interfaces.

 If I want to add feature to export schedule in ics format, I can use your helper to do that like this :

 

AppointmentCalendarExporter exporter = new AppointmentCalendarExporter();
exporter.Export(this.Appointments.OfType<IAppointment>(), txtWriter);

 

But your exporter make assumption on IExceptionOccurence and try to cast it in telerik class, and in my case it raise an exception :

"Impossible d'effectuer un cast d'un objet de type 'CustomExceptionOccurenceModel' en type 'Telerik.Windows.Controls.ScheduleView.ExceptionOccurrence'."

This behaviour is not really in phase with Appointment and RecurrenceRule, the helper don't suppose that IAppointment and IRecurrenceRule are telerik class. With do you have exception for IExceptionOccurrence ?

Regards

Luc

Kalin
Telerik team
 answered on 09 Apr 2015
4 answers
154 views
Hi,
Is there any limit for tree layout? There are 1100 items and 1200 connections in the diagram. And when applying layout throw stackoverflowexception. Sugiyama Layout working correctly. And tree layout working small diagram( 10 Items, 9 Connections). But in large one, not working. I believe Tree DataStructure function generally recursive one. So It caused the StackoverflowException.
Thanks in advance.
Petar Mladenov
Telerik team
 answered on 09 Apr 2015
2 answers
170 views
i want a video player kind of functionality in Slider. The slider movement should be handled from play ,pause or stop button 
Chandan
Top achievements
Rank 1
 answered on 09 Apr 2015
1 answer
92 views

Hi,

 

Information: I am currently using version 2014.2.729.45 of the Telerik WPF Controls suite.  I am wondering if the following is possible:

 

Problem: Within two groups (date and venue) am I able to filter only venues within each date block that have appointments on them?

 

Details:

I have currently using two groupings for my Day and Week view definitions, they are as follows:

<telerik:RadScheduleView.GroupDescriptionsSource>
    <telerik:GroupDescriptionCollection>
        <telerik:DateGroupDescription />
        <telerik:ResourceGroupDescription ResourceType="Venue" ShowNullGroup="False" />
    </telerik:GroupDescriptionCollection>
</telerik:RadScheduleView.GroupDescriptionsSource>

This could look like:

Monday

     Venue 1

     Venue 2

     Venue 3

 

Tuesday

     Venue 1

     Venue 2

     Venue 3

 

Wednesday

    Venue 1     

    Venue 2 

    Venue 3

 

I have tried using the Group Filter property against the view definitions to achieve the required result I am after.  However, it appears that it takes all three days, works out which venues have appointments in them, and then shows them all days, irrespective of whether or not a particular day does in fact have something in that venue.

 

The result I would like to see is:

Monday

     Venue 3

 Tuesday

     Venue 1

Wednesday

    Venue 1

    Venue 3

 

The reason for this, is because the particular venues in questions, only have appointments on those days.  and Venue 1 and 2 on Monday are empty the entire day and so I do not want to display them.  Is there a setting I am missing for hide empty resources?

 

Is this possible?

 

 

Kind Regards,

 

Shaun

Nasko
Telerik team
 answered on 09 Apr 2015
14 answers
760 views
I've got a double-click event wired up on my telerik gridview. Annoyingly for the users, if I double-click on the scrollbar area with the intention of scrolling down, the double-click event fires. Can this be disabled?
Dimitrina
Telerik team
 answered on 09 Apr 2015
3 answers
218 views

Hello,

I have a problem with a telerik radtabcontrol which doesn't occur with the standard wpf tabcontrol.

My code is structured as follows :-

<telerik:RadTabControl>
    <telerik:RadTabItem Header="Locations" IsSelected="True">
         
        // irrelevant stuff here
         
    </telerik:RadTabItem>
    <telerik:RadTabItem Header="Sources">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
 
            <telerik:RadTabControl  ItemsSource="{Binding MyViewModel.Sources}"
                                    SelectedItem="{Binding MyViewModel.SelectedSource}">
                <telerik:RadTabControl.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Style="{StaticResource SubTabTitle}" Text="{Binding DisplayName}"/>
                            <Button Command="{Binding Path=DataContext.MyViewModel.RemoveSourceCommand,ElementName=LayoutRoot}" CommandParameter="{Binding}" ToolTip="Remove Source" Style="{StaticResource RemoveButton}" />
                        </StackPanel>
                    </DataTemplate>
                </telerik:RadTabControl.ItemTemplate>
                <telerik:RadTabControl.ContentTemplate>
                    <DataTemplate>
                        <ScrollViewer>
                            <StackPanel>
                                <view:EditExcelSourceControl ViewModel="{Binding Path=DataContext.MyViewModel, ElementName=LayoutRoot}" Workbook="{Binding Path=DataContext.MyViewModel.SelectedExcelWorkbook,ElementName=LayoutRoot}" Visibility="{Binding Path=DataContext.MyViewModel.HasSelectedExcelWorkbook,ElementName=LayoutRoot,Converter={c:BooleanToVisibilityConverter}}"/>
                                <view:EditTextSourceControl ViewModel="{Binding Path=DataContext.MyViewModel, ElementName=LayoutRoot}" File="{Binding Path=DataContext.MyViewModel.SelectedTextFile,ElementName=LayoutRoot}" Visibility="{Binding Path=DataContext.MyViewModel.HasSelectedTextFile,ElementName=LayoutRoot,Converter={c:BooleanToVisibilityConverter}}"/>
                            </StackPanel>
                        </ScrollViewer>
                    </DataTemplate>
                </telerik:RadTabControl.ContentTemplate>
            </telerik:RadTabControl>
        </Grid>
    </telerik:RadTabItem>
</telerik:RadTabControl>

Setting SelectedSource causes OnPropertyChange notifications for SelectedSource, and updates SelectedTextFile, SelectedExcelWorkbook, HasSelectedTextFile, HasSelectedExcelWorkbook as appropriate.

The user control has code as follows

<telerik:RadComboBox ItemsSource="{Binding DataContext.ViewModel.Points, ElementName=LayoutRoot}" SelectedValue="{Binding CurrentPoint}" Width="150">
    <telerik:RadComboBox.ItemTemplate>
        <ItemContainerTemplate>
            <TextBlock Text="{Binding Name}" Margin="0" Padding="0" />
        </ItemContainerTemplate>
    </telerik:RadComboBox.ItemTemplate>
</telerik:RadComboBox>

 

My problem is that if I switch between the toplevel tabcontrol items (from 'locations' tab to 'sources' tab), the object that the selectedsource is bound to on the nested tabcontrol will have it's currentpoint set to null.

If I modify the nested tabcontrol to be a simple WPF tabcontrol instead of a telerik:radtabcontrol, I do not have this problem where currentpoint is set to null.

Any help would be appreciated, thank you.

 

 

 

AshR
Top achievements
Rank 1
 answered on 09 Apr 2015
1 answer
136 views

Problem Background:
In my WPF application, in one of the window/page contains 3 List Boxes and 1 ComboBox. These 3 ListBoxes are binded with XML dataprovider and there is no issues. I mean when 1st listbox selection changes automatically updates listbox2. In the same way, listbox3 updates as listbox2 changes. These are all worked out in XAMl file alone and there is code-behind except InitializeComponent() and few lines of code for loading this XAML file dynamically using XAMLReader(this is my requirement)

Problem facing Requirement:OnSelection change event of any of the ListBox, need to populate ComboBox data dynamically( it will fire webservices which is based on above mentioned 3 LisBox selection). For this purpose, in SelectionChange I am trying to get

ListBoxObj.SelectedItem - Always contains XML tree.(i.e) of type XMLElement

I have tried all possiblities, everywhere I am getting only XML tree.
Anyone have any idea, how to extract ListBox selected Item Text from XMLElement?
Thanks

Nasko
Telerik team
 answered on 08 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?