Telerik Forums
UI for WPF Forum
1 answer
169 views
Hello everyone,

I would like to ask for a help on a MVVM related issue.

We use a telerik RadRibbonView with Tabs in Silverlight and everything works. For some reasons we need to convert our base shell to WPF also. With this came up an issue - when in shell is used a viewmodel, then the bindings in the ribbontab views to ribbontab viewmodels fail to work.

As you can simulate in the attached project, it is enough to comment out the section for shell viewmodel import, and it gets to work. How to enable shellviewmodel and preserve the bindings of ribbontab views to their viewmodels working?

http://www.filedropper.com/radribbontestwpfapplication

Any help would be graceful.

Thank you.
Tina Stancheva
Telerik team
 answered on 22 Aug 2011
1 answer
229 views
Dear everybody,

is it possible to re-style the border of a column once it is frozen? I'd like to get rid of the shadow then.

Can somebody explain how to do this?

Thanks
Dimitrina
Telerik team
 answered on 22 Aug 2011
1 answer
68 views
Hi,
I could not drag and drop the appointments in the RadScheduleView. I dont know what went wrong. I am using PRISM 4.0. I have two regions. The view which has the scheduleview is loaded in these regions. I can do drag and drop in the view which is loaded in the first region. The same view is loaded in the second region, but drag and drop is disabled. I tried with different view, the same thing happens.
Any HELP?
Valeri Hristov
Telerik team
 answered on 22 Aug 2011
1 answer
74 views
Is there any way to hover over map shapes and change the color of the underlying (state, country,...)?

Thanks for a quick answer.
Andrey
Telerik team
 answered on 22 Aug 2011
1 answer
316 views
I have looked through all of the samples, including the samples on this forum and I am just not understanding how to bind a collection of custom push pins using the MVVM paradigm. I understand the InformationLayer is an items control, so I should be able to bind anything to it, but it's just not working for me.

Consider a simple class like the following:

public class Address
{
    public Location Location { get; set; }
    public string Address { get; set; }
    public string City { get; set; }
    public string State { get; set; }
    public string Zip { get; set; }
}

I'd like to be able to add a pin to the map for each Address. My intent is to eventually provide hover functionality so that a popup displays information over the pin when the mouse hovers over it, but I haven't gotten the pins to display. In the view model, I have a property of type ObservableCollection<Address>. I then bind to the address collection in the XAML with the following:

<telerik:InformationLayer ItemsSource="{Binding AddressPins}" />

I understand I will have to create an item template in order to achieve the hover affect I'm looking for, but it is my understanding the above code should render pins for each location specified by an Address object. The following is an ICommand that handles the DragDropManager's OnDropInfo event (I'm dragging tasks onto the map).

if (e.Options.Status == DragStatus.DropComplete)
{
    RadMap map = (RadMap)e.Options.Destination;
    Location dropCursorLocation = Location.GetCoordinates(map, e.Options.RelativeDragPoint);
    Entity.Task task = (Entity.Task)e.Options.Payload;
    Address pin = new Address
        {
            Address = task.Address,
            City = task.City,
            Location = dropCursorLocation,
            State = task.State
            Zip = task.Zip
        };
 
    System.Diagnostics.Debug.WriteLine("Dropped at Latitude: {0} - Longitude: {1}", dropCursorLocation.Latitude, dropCursorLocation.Longitude);
 
    // Add pin to the map
    this.AddressPins.Add(pin);
 
    e.Handled = true;
}

If somebody could please further clarify how to handle this, I would greatly appreciate it. It should be noted I also tried having the Address class extend the Pushpin class, without success. I didn't think this was necessary, however, because the WPF samples were simple POCO's.
Andrey
Telerik team
 answered on 22 Aug 2011
1 answer
151 views
Hi,
How can I show legend on chart in RadChart?
I mean insted of showing values on pie ,show the title of that part.
for example if a pie has 3parts with values 10,20 and 30, it draws based on the values but show title of values instead of values itself
Peshito
Telerik team
 answered on 22 Aug 2011
1 answer
141 views
Guys,

I have the following xaml below and bind my POI's ect via the ItemsSource Binding on the information layer. The information layer itself gets its shapedata by once static source for Asia.

Once I run the application I get the following exception:
Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead.

Is there any workaround you could offer in order to bind my map elements/POI's using the itemssource AND have the MapShapes configured in the XAML? I'd like to use as much MVVM I can and therefor I'd like to use data binding to my viewmodel.

Thanks,

XAML:

 
   <telerik:RadMap x:Name="radMap" CommandBarVisibility="Visible" IsTextSearchEnabled="False">
            <telerik:RadMap.Provider>
                <telerik:EmptyProvider/>
            </telerik:RadMap.Provider>
            
        <telerik:InformationLayer x:Name="informationLayer" ItemsSource="{Binding MapData}">
        
            
                           
                <telerik:InformationLayer.Reader>
                    <telerik:MapShapeReader DataSource="/DTClientServices.PlanningSuite.Views;component/Shapefiles/Asia/asia.dbf" Source="/DTClientServices.PlanningSuite.Views;component/Shapefiles/Asia/asia.shp" ClearLayer="False" />
                </telerik:InformationLayer.Reader>
                
       
                <telerik:InformationLayer.ItemTemplate>
                    <DataTemplate>
                        <Grid telerik:MapLayer.BaseZoomLevel="{Binding BaseZoomLevel}"
                       telerik:MapLayer.Location="{Binding Location}"
                       telerik:MapLayer.ZoomRange="{Binding ZoomRange}">
                            <telerik:MapLayer.HotSpot>
                                <telerik:HotSpot X="0.5"
                                           Y="0.5"
                                           ElementName="PART_Ellipse" />
                            </telerik:MapLayer.HotSpot>
                            <Ellipse x:Name="PART_Ellipse"
                               Width="20"
                               Height="20"
                               Stroke="Red"
                               StrokeThickness="3"
                               Fill="Transparent">
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="{Binding Caption}" />
                                </ToolTipService.ToolTip>
                            </Ellipse>
                        </Grid>
                    </DataTemplate>
                </telerik:InformationLayer.ItemTemplate>
            </telerik:InformationLayer>
        </telerik:RadMap>
Andrey
Telerik team
 answered on 22 Aug 2011
3 answers
110 views
Hi,

I don't see possibility to create recuring appointment "every last Monday of every 2 month". In help i found only "How to Create an Appointment that Occurs on Every "n-th" Week Day and the Interval Between Each Recurrence is "m" Months" and for this is used DayOrdinal property.

If support ticket would help to resolve this quicker let me know.

Thanks,
Saulius
Valeri Hristov
Telerik team
 answered on 22 Aug 2011
1 answer
118 views
Hello,

My wpf application has a UserControl that host a transition control. The transition control gets it's TransPages loaded in code.

#region Create our singleton that has the default pages
 
                //add our pages...hard coded for now
                TransPage tp_MVW = new TransPage();
                tp_MVW.DisplayName = "MVW";
                tp_MVW.PageUri = "/SSODemo;component/uc_MVW_Host.xaml";
 
                TransPage tp_MediT = new TransPage();
                tp_MediT.DisplayName = "MediTech";
                tp_MediT.PageUri = "/SSODemo;component/uc_TechHost.xaml";
 
                TransPage tp_Google = new TransPage();
                tp_Google.DisplayName = "Google";
                tp_Google.PageUri = "/SSODemo;component/uc_Google_Host.xaml";
 
                Props.TransitionMap = TransMap.Single_TransMap;
 
                Props.TransitionMap.Pages.Add(tp_MVW);
                Props.TransitionMap.Pages.Add(tp_MediT);
                Props.TransitionMap.Pages.Add(tp_Google);
 
            #endregion

and everything works as it should. Now these three user controls, as you can see, are static files in the project with a physical path. All three of the controls have a WPF WebBrowser control. What happens when a user clicks a hyperlink in one of these browsers that opens has target=_blank and a new window opens. Well yes a new window opens OUTSIDE of the WPF application. No worries I added the needed hooks and now intercept that new window opening event. At this point what I want to do is create a new control with a WebBrowser on it and send it to the desired url. THEN I want to add it to the TransPages so it shows in the list of windows to transition between. My question is two fold. What method would you recommend for dynamically generating the user control (I have an idea about using ControlTemplate) and more importantly HOW would I add this "UserControl object" to the PageUri when it is expecting a physical path?
TIA
JB


that host a webbrowser. This loads great and all is well. Next the user clicks on a link and a new browser window opens outside of the wpf app. This makes sense since the wpf browser is just a wrapper and not a true WPF control. So I intercept the new window event and this is where it gets tricky. I want to load the page being opened in a new usercontrol's web browser control. In other words repeat the situation by which my app opens dynamically.

So I thought about creating a "NewWebPage" UserControl template. Great I could use it one time. The next click no more NewWebPage template as it has been used. (well technically I could reuse it but then the current page would be lost) What I would really like to do is use the NewWebPage template as a template. Would a DataTemplate be the way to go for this? If so how exactly as I've not used one in this way before.

Ramjet
Top achievements
Rank 1
 answered on 22 Aug 2011
1 answer
211 views
I'm not sure whether this should be posted in the RadTreeView forum, the RadDocking forum or in this forum, but here goes...

I have a RadTreeView control that lives inside a RadDocking pane. The treeview has a RadContextMenu associated with it, and if I right-click on a TreeViewItem while the rad pane is floating, the icons in the context menu disappear. Here is the markup that I am using for the TreeView:

<telerik:RadTreeView x:Name="tvProjectNav" Padding="0 0 10 0"
                            Background="White"
                            SelectionMode="Single"
                            ItemPrepared="TvProjectNavItemPrepared"
                            MouseDoubleClick="TvProjectNavMouseDoubleClick"
                            ExpanderStyle="{StaticResource Expander}"
                            telerik:TreeViewPanel.IsVirtualizing="True"
                            IsEditable="False">


                            <telerik:RadTreeViewItem
                                Header="{StaticResource navDiagramRootNodeText}"
                                ItemsSource="{Binding Source={StaticResource ProjectProvider},Path=Diagrams,UpdateSourceTrigger=PropertyChanged}"
                                ItemTemplate="{StaticResource DiagramItemTemplate}"/>


                            <telerik:RadTreeViewItem
                                Header="{StaticResource navTrendGroupsRootNodeText}"
                                ItemsSource="{Binding Source={StaticResource ProjectProvider},Path=TrendGroups,UpdateSourceTrigger=PropertyChanged}"
                                ItemTemplate="{StaticResource TrendGroupItemTemplate}" />


                            <telerik:RadContextMenu.ContextMenu>
                                <telerik:RadContextMenu x:Name="navContextMenu"
                                    Opened="NavContextMenuOpened"
                                    ItemClick="NavContextMenuItemClick"
                                    ItemTemplate="{StaticResource contextMenuItemTemplate}"/>
                            </telerik:RadContextMenu.ContextMenu>
                            
                           
                        </telerik:RadTreeView>

Can anyone tell me why the images disappear when the pane is floating?
Konstantina
Telerik team
 answered on 22 Aug 2011
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?