Telerik Forums
UI for WPF Forum
1 answer
68 views
Hi guys,

Can you help me, I'mn trying to style a radpane. I've followed the website (http://www.telerik.com/help/wpf/raddocking-styling-the-radpane.html).
When blend makes a copy of an object the designer says:


This way it is not possible to change the style

David Groenewegen
Masha
Telerik team
 answered on 21 Oct 2013
2 answers
477 views
Hello, Im using this code:
<telerik:RadListBox Name="testlv" SelectionChanged="testlv_SelectionChanged" telerik:StyleManager.Theme="Windows8Touch">
                <telerik:RadListBox.Resources>
                    <Style TargetType="ScrollBar">
                        <Setter Property="telerik:StyleManager.Theme" Value="Windows8Touch" />
                        <Setter Property="MinWidth" Value="40" />
                        <Setter Property="MinHeight" Value="40" />
                    </Style>
                </telerik:RadListBox.Resources>
                <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                        <Border BorderBrush="Turquoise" BorderThickness="0,0,0,1" Width="{Binding Path=ActualWidth, ElementName=grdzero}">
                            <WrapPanel Orientation="Vertical" >
                                <TextBlock Foreground="Black" Text="{Binding nazwa}" FontSize="16"></TextBlock>
                                <WrapPanel Orientation="Horizontal">
                                    <TextBlock Foreground="Black" Text="Cena: "  FontSize="16"></TextBlock>
                                    <TextBlock Foreground="Black" Text="{Binding cena}"  FontSize="16"></TextBlock>
                                </WrapPanel>
                                <WrapPanel Orientation="Horizontal">
                                    <TextBlock Foreground="Black" Text="Kod: "  FontSize="16"></TextBlock>
                                    <TextBlock Foreground="Black" Text="{Binding kod}"  FontSize="16"></TextBlock>
                                </WrapPanel>
                            </WrapPanel>
                        </Border>
                    </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>

And I'd like to change width and height of scrollbar to value equal 40. How can I do it? (At this momment scrollbars are too small and cant be really touch by finger and scroll down).

Thanks in advance!
Paweł
Top achievements
Rank 1
 answered on 21 Oct 2013
1 answer
212 views
Hi.

I have the following code in ViewModel:
   private ITileItemModel _currentItem;
        public ITileItemModel CurrentItem
        {
            get
            {
                return _currentItem;
            }
            set
            {
                if (_currentItem == value) return;
                if (func()) return;
                _currentItem = value;
                RaisePropertyChanged(() => CurrentItem);
            }
        }
For RaisePropertyChanged I have redefinition, so it will work fine.

The *,xaml is as following:
<telerik:RadBreadcrumb x:Name="NavigationBreadcrumb"
                               HorizontalAlignment="Stretch" VerticalAlignment="Top"
                               TextModePath="TilePath"
                               IsTextModeEnabled="False"
                               HeaderMemberPath="Header"
                               HierarchicalItemsSource="Children"
                               HierarchicalMemberPath="Header"
                               IsHistoryEnabled="False"
                               Header="{Binding Root}"   
                               ItemsSource="{Binding Root.Children}"
                               CurrentItem="{Binding CurrentItem, Mode=TwoWay}"
                               >
             </telerik:RadBreadcrumb>

If  func() returns true I am not changing CurrentItem, but the breadcrumb shows the item I have selected in it. And I have situation with different values in breadcrumb and CurerntItem.

Could you help me to resolve this issue?

Best regards,
Ilya.
Zarko
Telerik team
 answered on 21 Oct 2013
6 answers
554 views
Hello All,
I am trying to add a button in RadWinodw Title bar using its HeaderTemplate. Although button is visible on Title but its command is not properly binding and getting following error in Output window.
BindingExpression path error: 'SaveCommand' property not found on 'object' ''String' (HashCode=1384875945)'. BindingExpression:Path=SaveCommand; DataItem='String' (HashCode=1384875945); target element is 'Button' (Name=''); target property is 'Command' (type 'ICommand')

Here is my XAML portion.
<telerik:RadWindow.HeaderTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <Button x:Name="btn" Content="button" Command="{Binding Path=SaveCommand}" />               
            </StackPanel>
        </DataTemplate>
    </telerik:RadWindow.HeaderTemplate>

Here is my SaveCommand property in my ViewModel object.
private DelegateCommand _saveCommand;
        public ICommand SaveCommand
        {
            get
            {
                if(_saveCommand == null)
                    _saveCommand = new DelegateCommand(param => SaveIndicator(), param => CanSaveIndicator());
                return _saveCommand;
            }
        }
        public void SaveIndicator()
        {
        }
        protected bool CanSaveIndicator()
        {
            if (eAppState == AppState.Fresh)
                return false;
            return true;
        }
And here is how I am creating view and assigning its DataContext.
InterpolatedIndicators.AddEditIndicators view = new InterpolatedIndicators.AddEditIndicators();
            view.DataContext = new InterpolatedIndicators.AddEditIndicatorsViewModel();
            view.Owner = this;
            view.ShowDialog();

Kindly note that when I am placing this button in Window Content section, then Command binding is working fine.
I have also tried to set its RelativeSource using following code
<Button x:Name="btn" Content="button" Command="{Binding Path=DataContext.SaveCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" />
But still it does not work.

Any help please.
Kalin
Telerik team
 answered on 21 Oct 2013
8 answers
470 views
Hello!

I have problems with RadMaskedCurrencyInput.
My culture is "ru-RU" and CurrencyDecimalSeparator is ','.

<telerik:RadMaskedCurrencyInput Value="12345" Placeholder=" " IsCurrencySymbolVisible="False">

The result is: 123 45.,00.

Control version is 2013.2.724.40.

I want to use '.' as decimal separator in spite of current culture and user settings. 
How can I do it?

Thanks is advance!
Sergey
Top achievements
Rank 1
 answered on 20 Oct 2013
3 answers
112 views
Hi,
I'm Interest for the AutoCompleteBox  Control but i have this issue:

Ihave this CustomFilteringBehavior:

public class CustomFilteringBehavior : FilteringBehavior
    {
        public override System.Collections.Generic.IEnumerable<object> FindMatchingItems(string searchText, System.Collections.IList items, System.Collections.Generic.IEnumerable<object> escapedItems, string textSearchPath, TextSearchMode textSearchMode)
        {
            var searchTextToUpper = searchText.ToUpper();
            var matchingItems = items.OfType<Person>().
                Where(x => x.FirstName.ToUpper().Contains(searchTextToUpper) || x.LastName.ToUpper().Contains(searchTextToUpper)
                || (x.FirstName + " " + x.LastName).ToUpper().Contains(searchTextToUpper));
 
            return matchingItems.Where(x => !escapedItems.Contains(x));
        }
    }

and in my main page i used this CustomFilteringBeahvior:

<UserControl.Resources>
         
        <local:ViewModel x:Key="ViewModel" />
        <local:CustomFilteringBehavior x:Key="CustomFilteringBehavior" />
         
        <DataTemplate x:Key="CustomItemTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding FirstName}" />
                <TextBlock Text=" " />
                <TextBlock Text="{Binding LastName}" />
            </StackPanel>
        </DataTemplate>
         
    </UserControl.Resources>
 
    <Grid x:Name="LayoutRoot" Background="White" DataContext="{StaticResource ViewModel}">
        <StackPanel>
            <telerik:RadAutoCompleteBox ItemsSource="{Binding People}"
                                        FilteringBehavior="{StaticResource CustomFilteringBehavior}"
                                        DropDownItemTemplate="{StaticResource CustomItemTemplate}"
                                        BoxesItemTemplate="{StaticResource CustomItemTemplate}"
                                        SelectionMode="Single"
                                        AutoCompleteMode="Suggest" />
        </StackPanel>
    </Grid>

when typing :


in SelectionMode="Multiple" all works fine but
in SelectionMode="Single" the result after selection is :


is there any idea for this behavior ?

Thank you in advance,
Toumir
Top achievements
Rank 1
 answered on 20 Oct 2013
20 answers
2.8K+ views
Hello,

I downloaded the trial version of RadControls for Silverlight and I'm having problems loading the assemblies. I extracted the downloaded contents to My Documents and added a reference to the DLLs, and got this error:

Could not load file or assembly 'Telerik.Windows.Controls.Navigation, Version=2008.2.826.0, Culture=neutral, PublicKeyToken=9c7324f9b8e4111a' or one of its dependencies. The system cannot find the file specified.

I tried copying the DLLs to my bin directory and resetting the references but still got the same error. Does anyone know what could be the cause of this problem?

Thanks,

Daniel
Lane
Top achievements
Rank 2
 answered on 18 Oct 2013
1 answer
113 views
I have a single RadListBox and I just want to enable drag re-ordering with no drop capabilities (the documentation is this area is horribly unclear).

I have the following XAML:

<tel:RadListBox ItemsSource="{Binding Path=DtedDirectories}"
                SelectedValue="{Binding Path=SelectedDtedDirectory}"
                SelectionMode="Single">
    <tel:RadListBox.ItemContainerStyle>
        <Style TargetType="tel:RadListBoxItem">
            <Setter Property="tel:DragDropManager.AllowCapturedDrag" Value="True" />
        </Style>
    </tel:RadListBox.ItemContainerStyle>
    <tel:RadListBox.DragDropBehavior>
        <tel:ListBoxDragDropBehavior AllowReorder="True" />
    </tel:RadListBox.DragDropBehavior>
</tel:RadListBox>

The problem I have is that the list box will let me drop items outside of it, thus removing the item from the list.  I do not want this behavior.
Rosen Vladimirov
Telerik team
 answered on 18 Oct 2013
1 answer
100 views
I may be going about this the wrong way, but here's what I am doing. I have a polygon (or whatever). I want to click a vertex point, drag it, and have the polygon updated. I do this by creating a MapPinPoint for each vertex. In the MouseLeftButtonDown event for this point, I set the MouseDragMode to None. In the Map_MouseLeftButtonUp event, I set the MouseDragMode back to Drag. The problem is when I do this, the map sometimes does a pan operation based on where I originally clicked down and where I lifted up. How can I prevent this, or is there a better way to do it?
Andrey
Telerik team
 answered on 18 Oct 2013
2 answers
229 views

I've just switched to telerik and are replacing my elements.

My problem is that the normal expander works and the telerik doesnt..  I've placed them next to each other in the code, to validate this.

 

<Expander IsExpanded="{Binding Path=IsExpanded}"></Expander> 
 
<Telerik:RadExpander IsExpanded="{Binding Path=IsExpanded}" ></Telerik:RadExpander> 
 

Bound to

private bool _isExpanded = true;  
public bool IsExpanded  
{  
   get { return _isExpanded; }  
   set 
   {  
       _isExpanded = value;  
       //Some code  
   }  

Is this the wrong way to do it?

- Martin

Steve
Top achievements
Rank 1
 answered on 18 Oct 2013
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?