Telerik Forums
UI for WPF Forum
1 answer
172 views
I bound IsReadOnly with VM's property.
Code like this, but it's not working.

DbIsReadOnly is VM's property.

<telerik:PropertyDefinition Binding="{Binding Path=Host,Mode=TwoWay}" GroupName="dbSquidPorperties" DisplayName="{DynamicResource IP}" IsReadOnly="{Binding DataContext.DbIsReadOnly,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"    OrderIndex="0"/>
Ivan Ivanov
Telerik team
 answered on 27 Feb 2014
1 answer
74 views
Hi,
could you make SelectedItems property as DependencyProperty? Why is this property marked as private?

Thanks for your answers.
Ivan Ivanov
Telerik team
 answered on 27 Feb 2014
8 answers
391 views
I learned how to set a RadTreeViewItem's expander style dynamically by WPF data binding, see the link below.
http://blogs.telerik.com/blogs/11-01-17/controlling-treeview-s-expanderstyle-dynamically.aspx

However, if I change ExpanderStyle to StaticResource, it doesn't work. (But it works for RadTreeView)
<Style x:Key="ContainerStyle" TargetType="telerik:RadTreeViewItem">
    <Style.Setters>
        <!--<Setter Property="ExpanderStyle" Value="{Binding MyCustomExpanderStyle, Mode=TwoWay}"/>-->
        <Setter Property="ExpanderStyle" Value="{StaticResource ExpanderStyle_3}" />
    </Style.Setters>
</Style>

​What's interesting is when I click "Clear Local Item Style", the style is applied.

How can I set an item's expander style to static resource just like the tree view?
Yanming
Top achievements
Rank 1
 answered on 27 Feb 2014
4 answers
252 views
Hi,
I want to serialize (and later deserialize) the content of the ResourceDictionary of the shape.
One Idea was to store the number of resources to serialize and store the dictionary entries as Resource_1, Resource_2, Resource_3, ...
I have to store the Key, the Value and the Type. Is there a convenient (builtin) way to do this? Or have I to convert it manually to a string and back?

Alex
Alexander
Top achievements
Rank 1
 answered on 27 Feb 2014
1 answer
113 views
I am using RadDiagram to create some rather large diagrams that often do not fit in one screen. Using the scroll bars is rather fiddly. Is there an easier way to navigate around the diagram? Something like holding the mouse button down and moving to different parts of the diagram?
Petar Mladenov
Telerik team
 answered on 27 Feb 2014
2 answers
202 views
I have the following XAML for a context menu which has a DataTemplate to show custom menu content using a ContentPresenter, but it does not close when the content in the ContentPresenter is clicked, it only closes when I click on content outside of the ContentPresenter.

Why is this happening?

Also, why doesn't the ContentPresenter fill the available MenuItem header, even with 'Stretch' for both the horizontal & vertical alignment is does not fill the available space?

Thanks.
<telerik:RadContextMenu.ContextMenu>
    <telerik:RadContextMenu x:Name="radContextMenu" Placement="Bottom"
                    Visibility="{Binding Path=HasContextMenu, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"
                    ItemsSource="{Binding Path=ContextMenu, Mode=OneWay}">
        <telerik:RadContextMenu.Resources>
            <DataTemplate DataType="{x:Type vm:MenuCustomViewModel}">
                <telerik:RadMenuItem x:Name="CustomMenuItem"
                                Command="{Binding Path=Command, Mode=OneWay}">
                    <telerik:RadMenuItem.Header>
                        <ContentPresenter x:Name="MenuContentPresenter"
                                    Content="{Binding Path=Content, Mode=OneWay}">
                        </ContentPresenter>
                    </telerik:RadMenuItem.Header>
                </telerik:RadMenuItem>
            </DataTemplate>
            <DataTemplate DataType="{x:Type vm:MenuSeparatorViewModel}">
                <Separator />
            </DataTemplate>
        </telerik:RadContextMenu.Resources>
    </telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>


Ollie
Top achievements
Rank 1
 answered on 27 Feb 2014
1 answer
131 views
I am new to WPF and have developed a RadMap for Silverlight previously using MVVM.

I'm attempting to duplicate this for WPF that can be accessed from the web but I'm not seeing what I expect in the project.

I started out in VS 2010 clicking new Project > Telerik > Telerik C# WPF Application

I added a new WPF page and added the RadMap to it.

I've created the xaml, created the ViewModelBase class etc. Here is what I have so far:

xaml:
<Page x:Class="ccWPF.Centers"
      mc:Ignorable="d"
      d:DesignHeight="300" d:DesignWidth="300"
    Title="Centers">
 
    <Grid>
        <telerik:RadMap x:Name="radMap" />
    </Grid>
</Page>

XAML.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Controls.Map;
 
namespace ccWPF
{
    /// <summary>
    /// Interaction logic for Centers.xaml
    /// </summary>
    public partial class Centers : Page
    {
        public Centers()
        {
            InitializeComponent();
 
            this.radMap.Provider = new BingMapProvider(MapMode.Aerial, true, "myKey");
        }
    }
}

Is there a simple solution someone can attach that would demonstrate this using MVVM available for the web and not a desktop application? I will be binding from SQL Server data.

Thanks,

Tim









Andrey
Telerik team
 answered on 27 Feb 2014
3 answers
135 views
Hi,

I have a grid designed as shown in the first image when my Zoom is at say, Zoom="16, 5":

I have implemented a zoom button that when clicked, will increase the zoom width and height in increments of 6 and 1 respectively.

When I increment to  say, "28, 7" the grid now looks like that in the second image.

Is there any way for me to force the grid to maintain the same height/size proportion when zomming?

Thanks.
Martin Ivanov
Telerik team
 answered on 26 Feb 2014
2 answers
147 views
I have created a simple WPF application that has a button and a RadRichTextBox using most recent 2013 build. The text box is hidden by default (not sure if that has any bearing but it's how the main app works so I'm being consistent). 

When the user presses the button the app reads XAML from a text file (~900k) and converts to a RadDocument using the XamlFormatProvider. Total elapsed time is < 2s.

I then set the document of the text box to the resultant document and make the text box visible. The entire UI of the app freezes for about 2 minutes until the text box creates the initial rendering of the document and then freezes for an additional 2 minutes until the scrolling is finished.

I'm happy to share code and data if need be.

How do I work around this?

rjsjr
Sandra
Top achievements
Rank 1
 answered on 26 Feb 2014
3 answers
240 views
Hi,

I am new to WPF and am trying to understand the best control to use for my implementation. Any help would be greatly appreciated.

I have two observable collections in my view model. My requirement is that i have to display one collection on the first column and the other collection on the second column of the RadWindow. I am currently using two RadTileView controls for this. Clicking on each tile will take the user to a different screen.

I have two issues with the above implementation.
 1) It currently displays a scrollbar for each RadTileView. Can i display one common scrollbar for both the RadTileViews?
 2) If the first collection is empty, I should not display the first column and should left align the second column.

Is RadTileView the right control for this? If not can you please suggest other controls that i can use?
                      
I can change the ViewModel to have one observableCollection and identify where each entry will go if that helps.

I attached a screenshot of the view.

Thanks!                 
Tina Stancheva
Telerik team
 answered on 26 Feb 2014
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?