Telerik Forums
UI for WPF Forum
1 answer
368 views
How do I determine current tab header and index using the RadTabControl (VB.NET)?

Thanks

G
Zarko
Telerik team
 answered on 07 Sep 2012
1 answer
138 views
Hi,
I am using Radgrid with office black style and am applying a sort descriptor from code, this results in the column header of the sorted column being a different colour from the rest how do I change the default behaviour so that the header is the same as the others?

Regards,
Joe
Yoan
Telerik team
 answered on 07 Sep 2012
8 answers
176 views
Hello,

Guessing whats happening has something to do with the transparent window used in the Docking control. When our users use one of our programs that contain the docking control inside terminal services everything else disappears. I was wondering if you guys had any ideas on how to get around this? We're thinking of removing the control for now.

Thanks much,
~Boots
Marcel
Top achievements
Rank 1
 answered on 07 Sep 2012
3 answers
270 views

I am trying to implement drag-and-drop (holding CTRL pressed) of items into children. Although on DropQuery I set QueryResult to true the tree still denies dropping.

Any reason for this?

Any workaround?

Hristo
Telerik team
 answered on 07 Sep 2012
1 answer
123 views
Hi,

I'm using transition control for changing screens on my application. The transition effect works fine on all screens until I added a RowReorderBehavior on a GridView on one of the screens. The transition effect works on other screens except the one with that gridview. Can anyone help me fix it?

Thanks,
Mark
Mark
Top achievements
Rank 1
 answered on 07 Sep 2012
2 answers
342 views
.NET 4.0
Telerik.Windows.Controls v4.0.30319

During design time, RadPaneGroup throws an exception, but the application builds and runs successfully. Very rarely, the designer will load successfully. The exception thrown in the designer is shown as a flyout panel within the designer stage area and is as follows:

Type reference cannot find type named '{clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls}MetroTouchTheme'.
   at MS.Internal.Xaml.Context.ObjectWriterContext.ServiceProvider_Resolve(String qName)
   at MS.Internal.Xaml.ServiceProviderContext.System.Windows.Markup.IXamlTypeResolver.Resolve(String qName)
   at System.Windows.Markup.TypeTypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at System.Windows.Baml2006.TypeConverterMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)

Here's the XAML:

<Window x:Class="ININ.PSO.MiniClient.Main.UI.Media_Desktop.MediaDesktop"
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
        Title="Media Desktop" Height="569" Width="858"
        Loaded="Window_Loaded" Icon="/Images/16/window_sidebar.png">
    <Grid>
        <telerik:RadDocking Name="radDocking" Background="AliceBlue">
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane Header="WAW 1">
                            <TextBlock Text="Some Text" />
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
        </telerik:RadDocking>
    </Grid>
</Window>

To my knowledge, I am not using metro for anything. Does anyone have any ideas?
Tim
Top achievements
Rank 1
 answered on 06 Sep 2012
2 answers
1,000 views
Hello,

I followed the Getting Started tutorial here to create bold/italic/underline formatting toggle buttons for a WPF application: http://www.telerik.com/help/wpf/radrichtextbox-getting-started.html

And they work, however there is a bug.

If you have no text entered into the RichTextbox and click one of the buttons, it doesn't get highlighted. The text gets the correct formatting, however the button doesn't toggle.

If you click in the middle of the text the buttons highlight correctly, it just seems to happen when the caret is at the end of the line (and outside a span maybe?).

I'm not sure how to solve this.

Thanks.
Erik
Top achievements
Rank 1
 answered on 06 Sep 2012
4 answers
159 views
Hi,
I try to attach some default values to certain categories, i.e. when the user selects "Category1" in the CategoryCombo, the "Subject", "Body" etc. in the current appointment should be filled with a default text/values.

Now to my problem:
As soon as a category entry is selected, I'd like to "preselect" the default resources in the drop down "Personen" (see screenshot attached).

I've attached an event handler "PART_Categories_SelectionChanged "to the CategoryCombo. Is there a way to access the checkedItems in the resources drop down in order to set the default selection from code behind?

Thank you four your help!

Regards
Daniel
Daniel
Top achievements
Rank 1
 answered on 06 Sep 2012
0 answers
101 views
Hi,
I try to understand the working of the demo application. I can build the app. But when I open the SingleExample.xaml, The designer throws up an exception:
"Exception was thrown on QuickNavigation: Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception."
with the details
"Cannot find resource named 'NavigateCommand'. Resource names are case sensitive.
   at System.Windows.StaticResourceExtension.ProvideValueInternal(IServiceProvider serviceProvider, Boolean allowDeferredReference)
   at System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(MarkupExtension me, IServiceProvider serviceProvider)"

With 900 lines of xaml code, it is difficult to understand what is happening here. When I'm able to use the designer, I can pinpoint better the pieces I want to reuse.

How can I get a valid xaml-file for the designer?

Regards,
Alfons
Top achievements
Rank 2
 asked on 06 Sep 2012
2 answers
1.3K+ views

I am using WPF having a strange issue with RadListBox SelectedItem databinding, trying to figure out but no luck. Following is my scenario

  1. I am using Telerik Controls (RadListBox, and RadButton)
  2. RadButton is placed inside a ItemsControlRadListBox and ItemsControl are bind to sameItemsSource.
  3. I am using PRISM and MVVM.
  4. What I want is when I click on button, the same item is selected from RadListBox automatically,(This part working fine).
  5. Problem: As soon as I click on any item of RadListBox and then click back on any button the item selection stops working.
  6. Even more strange thing: I tried the same thing with standard WPF ListBox by adding attached behavior for selection changed event and attached property of Command and CommandParameter, it works fine, so it looks like an issue with Telerik RadListBox ?

Now let me come to code.

ViewModel Class 

public class MainViewModel : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;
 
    // Create the OnPropertyChanged method to raise the event
    protected void OnPropertyChanged(string name)
    {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (handler != null)
        {
            handler(this, new PropertyChangedEventArgs(name));
        }
    }
 
    public DelegateCommand<object> StudentSelected { get; set; }
    public DelegateCommand<object> ButtonPressed { get; set; }
 
    private void OnStudentSelected(object par)
    {
        //Debugger.Break();
        if (handled == false)
        {
            Student std = par as Student;
            if (std != null)
            {
                SelectedStudent = std;
            }
        }
        handled = false;
    }
 
    private void OnButtonPressed(object par)
    {
        //Debugger.Break();
        handled = true;
        String std = par as String;
        if (std != null)
        {
            foreach (Student st in _students)
            {
                if (st.Name.Equals(std))
                {
                    SelectedStudent = st;
                    break;
                }
            }
        }
    }   
 
    private Student _selectedstudent;
    private bool handled = false;
 
 
    public MainViewModel()
    {
        StudentSelected = new DelegateCommand<object>(OnStudentSelected);
        ButtonPressed = new DelegateCommand<object>(OnButtonPressed);
    }
 
    public Student SelectedStudent
    {
        get
        {
            return _selectedstudent;
        }
        set
        {
            _selectedstudent = value;
            OnPropertyChanged("SelectedStudent");
        }
    }
 
 
    private ObservableCollection<Student> _students;
    public ObservableCollection<Student> Students
    {
        get
        {
            return _students;
        }
        set
        {
            _students = value;
            OnPropertyChanged("Students");
        }
    }
}
 
public class Student
{
    public String Name { get; set; }
    public String School { get; set; }
}

MainView XAML 

<telerik:RadListBox Grid.Column="0" Grid.Row="0" ItemsSource="{Binding Students}" Command="{Binding StudentSelected}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self}, Path=SelectedItem}" SelectedItem="{Binding SelectedStudent, Converter={StaticResource DebugConverter}}">
<!-- The above debug converter is just for testing binding, as long as I keep on clicking button the Converter is being called, but the moment I click on RadListBoxItem the Converter is not called anymore, even when I click back on buttons -->
                <telerik:RadListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}"></TextBlock>
                    </DataTemplate>
                </telerik:RadListBox.ItemTemplate>
            </telerik:RadListBox>
            <Label Grid.Row="0" Grid.Column="1" Content="{Binding SelectedStudent.Name}"></Label>
            <StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
                <ItemsControl ItemsSource="{Binding Students}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <telerik:RadButton Width="100" Height="70" Content="{Binding Name}" Command="{Binding RelativeSource={RelativeSource FindAncestor,
    AncestorType={x:Type Window}}, Path=DataContext.ButtonPressed}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Content}">
                        </telerik:RadButton>
                    </DataTemplate>   
                    </ItemsControl.ItemTemplate>
 
                </ItemsControl>
            </StackPanel>

and finally populating the ViewModel and setting the Datacontext 

MainViewModel mvm = new MainViewModel();
ObservableCollection<Student> students = new ObservableCollection<Student>();
students.Add(new Student { Name = "Student 1", School = "Student 1 School" });
students.Add(new Student { Name = "Student 2", School = "Student 2 School" });
students.Add(new Student { Name = "Student 3", School = "Student 3 School" });
 
mvm.Students = students;
 
//Bind datacontext
this.DataContext = mvm;

Please give your suggestions and share you expertise.

I have created a demo project replicating the above scenario, please let me know if it is required?

Muhammad Ummar
Top achievements
Rank 1
 answered on 06 Sep 2012
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?