Telerik Forums
UI for WPF Forum
1 answer
120 views

Basically, when the use hits the OK button in the raddataform for a particular row I want to collapse the details.

An Mvvm friendly solution would be great!

Thanks ... Ed

 

Dilyan Traykov
Telerik team
 answered on 05 Dec 2016
1 answer
321 views

Also with RadListBox, of course. This is using the VisualStudio 2013 theme.

Simple repro:

Create a ListBox with IsEnabled=false.

Add a CheckBox item, with a Content="Testing" or whatever.

Notice that it is very dark, nearly unreadable. It's because in your theme XAML, you have set the RadListBoxItem disabled state contentPresenter to an Opacity of 0.2. Now, inside of a CheckBox, you also have similar code for the disabled state where the content's Opacity is set to 0.2.

Guess what? The 2 values multiply, which means now the CheckBox has an effective Opacity value of 0.2*0.2 = 0.04. :( That's dark.

I can see why this was done, because if your ListBox has strings only, then it works, because a TextBlock doesn't have a disabled state. Yeah, but what if your ItemTemplate has controls that they themselves have a darkened disabled state??? That doubles up the disabled-ness.

I like how Microsoft handles it by changing the Foreground to grey in their themes instead of screwing with Opacity (since Foreground is inherited), and that would work perfectly in both my cases, string-only lists and checkbox lists.

 

Martin
Telerik team
 answered on 05 Dec 2016
3 answers
276 views
I am using the trial for WPF and i have a datagrid set up with a 10 visible columns and 20+ that are hidden.

I have the search panel show above the datagrid. i would like to search for values in the hidden columns.

 

For example, the datagrid shows locations and address of buildings. lets say i want to find a record where 'Comments' column contains "secret message"

 

Visual aid: https://www.dropbox.com/s/6mfcxlvz2qhzqjd/Untitled.png?dl=0

Martin
Telerik team
 answered on 05 Dec 2016
6 answers
796 views

I am using the checkboxes in a RadTreeView. The treeview items are bound to my own heirarchical type called TreeNode. When an item is checked how do I determine which TreeNode object was checked?

Currently I am using a command to handle the IsChecked event of the control. I am passing the event arguments to the command. I can get access to all the checked items in the tree as TreeNodes, but am at a loss as to which one was actually last checked.

 <telerik:RadTreeView x:Name="TreePermissions"
                                                 DockPanel.Dock="Top"
                                                 MinHeight="50"
                                                 BorderBrush="Black"
                                                 BorderThickness="1"
                                                 Margin="5,0,5,0"
                                                 IsOptionElementsEnabled="True"
                                                 ItemsSource="{Binding UserPermissions}"
                                                 ItemPrepared="TreePermissions_ItemPrepared">
                                
                                <telerik:EventToCommandBehavior.EventBindings>
                                    <telerik:EventBinding Command="{Binding PermissionCheckedCommand}" EventName="Checked"
                                                          PassEventArgsToCommand="True" />
                                </telerik:EventToCommandBehavior.EventBindings>
                                
                                <telerik:RadTreeView.ItemContainerStyle>
                                    <Style TargetType="{x:Type telerik:RadTreeViewItem}">
                                        <Setter Property="IsExpanded" Value="True"/>
                                        <Setter Property="IsChecked" Value="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged}"/>
                                        <Setter Property="IsEnabled" Value="{Binding IsEnabled, UpdateSourceTrigger=PropertyChanged}"/>
                                    </Style>
                                </telerik:RadTreeView.ItemContainerStyle>
                            </telerik:RadTreeView>

 

private void OnPermissionChecked(object obj)
        {
            var args = obj as Telerik.Windows.Controls.RadTreeViewCheckEventArgs;
            Telerik.Windows.Controls.RadTreeViewItem item = args.OriginalSource as Telerik.Windows.Controls.RadTreeViewItem;
            // TreeNode node = item as TreeNode; // This does not work, cannot cast/convert for some reason
            Telerik.Windows.Controls.RadTreeView source = args.Source as Telerik.Windows.Controls.RadTreeView;
            if (source != null)
            {
                List<TreeNode> temp = source.CheckedItems.Cast<TreeNode>().ToList();
            }
        }

Heiko
Top achievements
Rank 1
 answered on 05 Dec 2016
1 answer
113 views
I am using a RadDateTimePicker to allow a user to select, strangely enough, a date and time.  I set the date for the control to some value (e.g. 8/16/2016 4:03 AM) which it happily displays (see attached DatePickerOK.jpg).  However, when the user clicks the button to pop up the picker, the calendar header says "January - 1000" (see attached DatePickerError.jpg) instead of the expected "August - 2016".  If the user selects a different time and closes the picker window, the text box displays the newly selected time along with the CORRECT month/day.  What am I missing?
Nasko
Telerik team
 answered on 05 Dec 2016
1 answer
524 views

I have an eventtocommandbehavior  binding as shown below to deal with the EditEnded event of the raddataform which I am using as a row details editor in my gridview. I get the call in my viewmodel from the command with the args, but they are kinda useless.
How to tell what row was being edited?
Also, if the user hits the cancel button how do I prevent the gridview from being updated? I am beginning to wonder what the raddataform buys me. 
My current dataform uses ONLY custom fields. Couldn't I just get rid of the raddataform and use a regular grid with the controls I want as a rowdetailstemplate? If I did that, how could I wire up the OnRowEditEnded event of the gridview to a command associated with a button in my rowdetails editor? For that matter, how to wire it up to the raddataform if I have to use it.
I hope I'm making sense here.

Any help would be great.

Thanks ... Ed

 

 

 

 

<telerik:RadDataForm CurrentItem="{Binding}" CommandButtonsVisibility="All">
 
    <telerik:EventToCommandBehavior.EventBindings>
 
        <telerik:EventBinding Command="{Binding DataContext.EditEndedCommand, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}" EventName="EditEnded" PassEventArgsToCommand="True"/>
 
    </telerik:EventToCommandBehavior.EventBindings>
 
</telerik:RadDataForm>
Stefan Nenchev
Telerik team
 answered on 05 Dec 2016
2 answers
318 views

Hello,

i'm using the Telerik Dock Controls.

In order to mvvm i'm using the binding to the Property PanesSource.

I Add a login Screeen at startup and want to show it in the center of the application and not docked to any of my SplitContainers.

The XAML head of the RadPane looks as followed:

<telerik:RadPane x:Class="ProductLifecycle.Frontend.UI.UserControls.LoginPage"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:ProductLifecycle.Frontend.UI.UserControls"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 xmlns:viewModels="clr-namespace:ProductLifecycle.Frontend.ViewModels"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300" Header="{Binding Title}"
                 d:DataContext="{d:DesignInstance viewModels:LoginPage, IsDesignTimeCreatable=False}"
                 telerik:RadDocking.DockState="FloatingOnly" telerik:RadDocking.FloatingSize="300,200" CanUserClose="False" CanUserPin="False" CanDockInDocumentHost="False" >

 

Everytime when i add this Control to my Binded Collection this window appears in the left of the docking control.

How can i start this window as floating window in front of my application?

Thanks,

Michael

Michael
Top achievements
Rank 1
 answered on 05 Dec 2016
6 answers
141 views
Dose the DataForm looking on the MetadataTypeAttributes for validations ?

I hava a wcf data service, that create a auto generated class, i added a partial class with MetadataType, but the dataform validation ignore the settings 

[MetadataType(typeof(Person.Metadata))]
    public partial class Person 
    {
        internal sealed class Metadata
        {
            [Required]
            public string FirstName { get; set; }
        }
    }
Randy Hompesch
Top achievements
Rank 1
 answered on 03 Dec 2016
1 answer
123 views

Hi to all,

I'm trying to use an EditTemplateSelector, but I have problem to retrieve DataContext of RadWindow, my RadWindow has x:Name="radWindow", its relative ViewModel exposes a List<T> collection called StatiCertificato, it seems that it not found it.

When selector use campoEditTesto it works correctly and it works correclty with campoEditData also, when it uses campoEditStato or campoEditDecisione show me correctly RadComboBox but without items. It checked that my collection are full.

Am I using a wrong approach for binding into ItemSource property? If yes, what's wrong?

<templateSelector:ValoreEditTemplateSelector x:Key="campiEditTemplateSelector">
    <templateSelector:ValoreEditTemplateSelector.campoEditTesto>
        <DataTemplate>
            <TextBox Text="{Binding Valore,Mode=TwoWay}"  />
        </DataTemplate>
    </templateSelector:ValoreEditTemplateSelector.campoEditTesto>
    <templateSelector:ValoreEditTemplateSelector.campoEditStato>
        <DataTemplate>
            <telerik:RadComboBox ItemsSource="{Binding StatiCertificato, ElementName=radWindow}"
                                 SelectedItem="{Binding StatoCertificatoSelezionato,Mode=TwoWay}"
                                 DisplayMemberPath="Descrizione" SelectedValuePath="Valore"/>
        </DataTemplate>
    </templateSelector:ValoreEditTemplateSelector.campoEditStato>
    <templateSelector:ValoreEditTemplateSelector.campoEditDecisione>
        <DataTemplate>
            <telerik:RadComboBox ItemsSource="{Binding DecisioniCertificato, ElementName=radWindow}"
                                 SelectedItem="{Binding DecisioneCertificatoSelezionato,Mode=TwoWay}"
                                 DisplayMemberPath="Descrizione" SelectedValuePath="Valore"/>
        </DataTemplate>
    </templateSelector:ValoreEditTemplateSelector.campoEditDecisione>
    <templateSelector:ValoreEditTemplateSelector.campoEditData>
        <DataTemplate>
            <telerik:RadDatePicker SelectedValue="{Binding Valore, Mode=TwoWay, Converter={StaticResource editDateConverter}}"/>
        </DataTemplate>
    </templateSelector:ValoreEditTemplateSelector.campoEditData>
</templateSelector:ValoreEditTemplateSelector>
Lance | Senior Manager Technical Support
Telerik team
 answered on 02 Dec 2016
1 answer
101 views

Hello,

I want to Change Deadline forecolor to Blue of Telerik Gantt view. Now it is in Red color.

Please help me.

Thanks in advance

Martin
Telerik team
 answered on 02 Dec 2016
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
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?