Telerik Forums
UI for WPF Forum
3 answers
359 views
In our application we need all the space we can get.
That's why we want to minimize the width and/or height of all our scrollbars.
In an resource-file we wrote this:

<Style  TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsFlicksEnabled" Value="false" />        
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto"/>
                <Setter Property="MaxHeight" Value="10" />
                <Setter Property="MinHeight" Value="10" />
            </Trigger>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Height" Value="Auto" />
                <Setter Property="MaxWidth" Value="10"/>
                <Setter Property="MinWidth" Value="10"/>                
            </Trigger>
        </Style.Triggers>
    </Style>

This works fine for all scrollbars in the application. Also for the Telerik-scrollbars.
However...
The RadGridView-scrollbars width or height are being changed because of the new style,
but the inner buttons: the thumb and the repeatbuttons are no longer in the center of the scrollbar. 
We use your Telerik-themes.
What is the best way to change the width/height of your scrollbars (but not loozing the telerik-theme-style) ?

Vanya Pavlova
Telerik team
 answered on 10 Nov 2010
6 answers
144 views
Is there a way to set a panning range for left, right, bottom and top.  I want to restrict a user to only pan to the edge of the map and not off the map.  Also, is there a way to restrict on how far a user can zoom down or up.  I instantiated the event handlers for zooming and panning  but wondering if there is an easier way to set a range.

void

 

 

RadMap1PanningFinished(object sender, RoutedEventArgs e)

 

{
    // TODO: Check if center is within panning range?

 

}

 

 

void RadMap1ZoomChanged(object sender, EventArgs e)

 

{

 

 

    if (this.RadMap1.ZoomLevel > 6)

 

 

 

        this.RadMap1.ZoomLevel = 6;

 

 

 

    if (this.RadMap1.ZoomLevel < 3)

 

 

 

        this.RadMap1.ZoomLevel = 3;

 

}



Please let me know. Thanks
Christopher
Top achievements
Rank 1
 answered on 09 Nov 2010
27 answers
539 views
Hi,

I'm using RadSlider in range mode and doing TwoWay databinding on SelectionStart and StelectionEnd properties. I set the values within Minimum/Maximum range. However, the very first time during dialog load the Slider coerces SelectionStart value to 0. 

This is the slider code:
<RadSlider Minimum="-10" Maximum="50"
           SelectionStart="{Binding Path=CappedMinBitrate, Mode=TwoWay}" 
           SelectionEnd="{Binding Path=CappedMaxBitrate, Mode=TwoWay}"
           IsSelectionRangeEnabled="True"
           />

Initial valud of SelectionStart is set to 3.0. In the attached screenshot you can see how the value is being set to 0 from CoerceSelectionStart method.

Please let me know if I'm doing something wrong or there is a way to fix it.

Thank you,
Ruben
Ruben Hakopian
Top achievements
Rank 1
 answered on 09 Nov 2010
5 answers
79 views
Hello,

I have a Carousel populated with Observsable collection using MVVM. I want to be able to filter the carousel with a button click event.

Any Samples would be great

THANKS
    Rick
Vlad
Telerik team
 answered on 09 Nov 2010
7 answers
344 views

I was not able to find any sample. I am wondering if there is any good sample. I want to be able to update frame.source based on selected items of the treeview. I generate all content with XMLDataprovider. Thank you in advance!

XAML:

 

<Window
    mc:Ignorable="d"
    x:Class="TwoListboxes_2.MainWindow"
    xmlns:local="clr-namespace:TwoListboxes_2"
    Title="MainWindow"
    Width="1000" Height="700">
    <Window.Resources>
        <local:UriConverter x:Key="UriConverter" /> 
        <XmlDataProvider x:Key="PageData" XPath="/Pages" Source="Data/data.xml" />
          
        <HierarchicalDataTemplate 
            DataType="Page" 
            ItemsSource="{Binding XPath=Level2}">
            <TextBlock FontWeight="Bold" Text="{Binding XPath=@Name}" />
        </HierarchicalDataTemplate>
  
        <HierarchicalDataTemplate 
            DataType="Level2" 
            ItemsSource="{Binding XPath=Level3}">
            <TextBlock Foreground="Red" Text="{Binding XPath=@Name}" />
        </HierarchicalDataTemplate>
  
        <DataTemplate 
            DataType="Level3">
            <TextBlock FontStyle="Italic" Text="{Binding XPath=@Name}" />
        </DataTemplate>
    </Window.Resources>
    <Grid HorizontalAlignment="Left" VerticalAlignment="Top">   
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="215"/>
                <ColumnDefinition Width="1"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid >
                <Border HorizontalAlignment="Left">
                    <telerik:RadTreeView 
                        x:Name="Nav_ListBox" 
                        ItemsSource="{Binding Source={StaticResource PageData}, XPath=Page}" 
                        SelectedValuePath="@UriSource" />
                </Border>
            </Grid
            <Frame Grid.Column="2" x:Name="ContentFrame" JournalOwnership="OwnsJournal" NavigationUIVisibility="Visible" Width="Auto" 
                Source="{Binding SelectedValuePath, Converter={StaticResourXML:ce UriConverter}, ElementName=Nav_ListBox, Mode=TwoWay}" />
    </Grid
</Window>

XML:

<?xml version="1.0" encoding="UTF-8"?>
<Pages>
    <Page Name="Name 1" UriSource="Pages/Name1.xaml" />
    <Page Name="Name 2" UriSource="Pages/Name2.xaml">   
        <Level2 Name="ALL1" UriSource="Pages/All1.xaml" />
        <Level2 Name="ALL2" UriSource="Pages/All2.xaml" />
        <Level2 Name="ALL3" UriSource="Pages/All3.xaml" />
    </Page>
    <Page Name="Name 3" UriSource="Pages/Name3.xaml">
        <Level2 Name="ALL4" UriSource="Pages/All1.xaml" >
            <Level3 Name="ALL3_1" UriSource="Pages/All1.xaml" />
            <Level3 Name="ALL3_2" UriSource="Pages/All2.xaml" />
            <Level3 Name="ALL3_3" UriSource="Pages/All3.xaml" />
        </Level2>
        <Level2 Name="ALL5" UriSource="Pages/All2.xaml" />
        <Level2 Name="ALL6" UriSource="Pages/All3.xaml" />
    </Page
    <Page Name="Name 4" UriSource="Pages/Name4.xaml" />
</Pages>


 

Vlad
Top achievements
Rank 1
 answered on 09 Nov 2010
4 answers
296 views
Hello,
First, thanks for making such a great library! I saved many hours by using the WPF controls.
I am working with the Slider with Selection Range enabled at the moment.
My slider should start at -12 and end at 0. This range can change, but will remain from a negative value to 0.
I would like the tick marks to be set every 4 units for instance, but I want the slider to increase or decrease by one only. Do you have any tip on how to achieve such behavior?
I would like also to lock the position of a thumb in a range slider, is that possible?
Thanks in advance for your support.
Petar Mladenov
Telerik team
 answered on 09 Nov 2010
1 answer
138 views
TreeView does a good job of representing a One-To-Many hierarchy.  However, I need the ability to represent a Many-To-Many hierarchy.  What I picture is more of a hierarchical spider diagram.  So, I can select a node, it moves into focus and it shows all of the parents (many) and children (many) as legs.  Does anyone have a suggested control that does this?

I thought of using 2 TreeViews.  So, I'd change the parent TreeView to flow from Right to Left with the selected node in the middle with a Right side orientation.  Then, the children would be represented with the traditional TreeView flowing from Left to Right with the selected node in the middle. 

This idea would work, but I prefer to have one control that does it all.

Thanks for your ideas,
Joel.
Hristo
Telerik team
 answered on 09 Nov 2010
3 answers
162 views
Hello, here's the scenario.

I have a Telerik Window and I have divided it's content to two parts. Left frame and Right frame using Frame Controls. I navigated to the left frame (LeftPage.xaml) by NavigationServices, same as the right frame (RightPage.xaml). Is there a possible way to get the current data that is loaded from the LeftPage.xaml to the RightPage.xaml?

For example: In my behind the code in LeftPage.xaml, I have a code that says textBox1.text = textBox2.text; so normally when I type in the left page on the textbox2 it will automatically get the current data that is being inputted to textbox1. Now my question is it possible to get the current data in textbox2 to the RightPage textbox3?

I tried binding it but it did not work, I tried instantiating the RightPage and access the textbox3 but it still wont work. It basically does not even let me do a evenet on another page from the original page. Am I doing something wrong? 
Kiril Stanoev
Telerik team
 answered on 09 Nov 2010
1 answer
303 views
I would like to use the TreeView control to represent an Org Chart.  Question is, how do I represent the weird situation where a person reports to 2 people?  Can I set up a TreeViewItem to have multiple nodes point at it?
Hristo
Telerik team
 answered on 09 Nov 2010
1 answer
187 views
The thing is, i want to be able to add custom user controls to the TransitionControl. Something like...

       
<local:CardControl>
    <Button Content="Hello" />
    <Button Content="Hello" />
</local:CardControl>


...and to be able to implement custom transition logic inside the inherited class.

Now, the class CardControl inherits from RadTransitionControl, like shown below:

     [ContentProperty("Items")]
    [ContentWrapper(typeof(Collection<UIElement>))]
    public class CardControl : RadTransitionControl
    {
        public static readonly DependencyProperty ItemsProperty =
            DependencyProperty.Register("Items", typeof(Collection<UIElement>),
                 typeof
(CardControl), new FrameworkPropertyMetadata(new Collection<UIElement>(),
FrameworkPropertyMetadataOptions.AffectsRender
, OnItemsChanged));
                               
 
 public Collection<UIElement> Items
 {
    get { return (Collection<UIElement>)GetValue(ItemsProperty); }
    set
        {
          SetValue(ItemsProperty, value);
        }
 }
       
        public CardControl()
        {
            
        }
 
        private static void OnItemsChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)
        {
            (dependencyObject as CardControl).Content = (eventArgs.NewValue as Collection<UIElement>)[0];
        }
    }

As you can see, I've added the ContentPropertyAttribute, which in turn, should allow the user to add items in XAML, and store them in the Items property. It works, if i use a single item, but it shows no reaction, when i try to use the collection of UIElements.

Any ideas on how to make it work?
Thanks,
Sandi Markon
Top achievements
Rank 1
 answered on 09 Nov 2010
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?