Telerik Forums
UI for WPF Forum
2 answers
94 views

 

Hi All,

I want to Reorder the RasExpander Control with the help of DragDropManager inside the Stackpanel. Can you please guide me how to do this? Please help me with the sample if possible.

Thanks,
Sakthi
Sakthi
Top achievements
Rank 1
 answered on 26 Sep 2012
1 answer
240 views
I am currently setting the background color of my rows to red, yellow or green based on the status of the underlying business object. I have the selection unit set to FullRow. The problem is that when a user selects a row, it changes to a dark gray.

Is there an easy way so that instead of setting the background color of the selected row to the default gray, that it would only put a blue border around the selected row, and still show the background color that I set?

Vlad
Telerik team
 answered on 26 Sep 2012
1 answer
115 views
Is it possible to programmatically assign the ItemsSource of a RadListBox within GridViewDataColumn's DataTemplate?
Vlad
Telerik team
 answered on 26 Sep 2012
2 answers
225 views
Hi,

In my WPF Application i used telerick controls.
I used Rad Menu control.
Whenever mouse over the menu item effect is coming to both menu item and separator.
My requirement is remove mouseover effect to separator.
Can any one guide me in that?

Thanks,
Ramki
Rosen Vladimirov
Telerik team
 answered on 25 Sep 2012
2 answers
77 views
Hi,
I've just updated the dll's (Version 2012.2.912.40) and I am having problems when trying to set themes via =>
telerik:Theming.Theme="Windows7"

What how can I accomplish this functionality in the new version ?

Thanks in advance
Krissi

Sia
Telerik team
 answered on 25 Sep 2012
5 answers
257 views
Hi, How could I hide the button near RadTabItem on RadTabControl? See atache please.
Thanks
Tina Stancheva
Telerik team
 answered on 25 Sep 2012
1 answer
105 views
Greetings,
i have the following problem:

for my domain model i have a base abstract class that override the equals and gethash code. I made this cause i work with NHibernate with differents unit of works, so i open and close session very often. At the bottom of topic you can find the class.

I found some problems using an observable collection that use the class inherited from ModelBase.
The problem arises when i use the ShowInsertRow on the gridview.
1. If i start adding a new row, if i cancel the process -> cannot see the added row, but it is in the observable collection and if i reorder the gridview i can see it.
2. For each row created (like that i would canceled in point 1, or just cause i had committed it) i cannot delete it.

Do you have any suggestion?

If i take on account to start use your orm, how is the best practice to manage this? does it need to override?

Thx in advance
Mauro

P.s.: sorry for my poor english, tell me if something is not clear

 public abstract class ModelBase<TPKey> : dlcts.IModelBase<TPKey>, INotifyPropertyChanged {
   ///EDIT: eliminated wrong comment, Id is the PrimaryKey of the entity in the database
    public virtual TPKey Id { get; set; }
    /// <summary>
    /// Return if the implementation of the PrimaryKey is not equals the default of its type
    /// </summary>
    public virtual bool IsPersisted { get { return !Id.Equals(default(TPKey)); } }

    ... omitted code

    #region Equals-HashCode
    /// <summary>
    /// Check the equality of the PrimaryKey of 2 objects (if they are of the same type)
    /// </summary>
    /// <param name="obj"></param>
    /// <returns></returns>
    public override bool Equals(object obj) {
      //with this line it is all ok
      return base.Equals(obj);
       //with these 4 lines i have the problems
       ModelBase<TPKey> other = obj as ModelBase<TPKey>;
       if (other == null) return false;
       if (this.Id.Equals(default(TPKey)) || other.Id.Equals(default(TPKey))) return false;
       return this.Id.Equals(other.Id);
    }
    /// <summary>
    /// Return the HashCode of the primary key
    /// </summary>
    /// <returns></returns>
    public override int GetHashCode() {
      //with this line it is all ok 
      return base.GetHashCode(); 
      //with this line i have the problem
      return this.Id.GetHashCode();
       
    }
    #endregion
}

Mauro
Top achievements
Rank 1
 answered on 25 Sep 2012
9 answers
459 views
Hi!

Following scenario:
I have a grid with a GridViewComboBoxColumn. The ItemsSource is a list of items, which shall only be selectable once. Therefore I am adapting the list of items, according to the edited row and hide all already selected items dynamically. This means, after all items have been selected, the list of items will be empty.

Now comes the problem:
When I enter edit mode in a row, all other rows in the column become emtpy. The grid just does not show the right thing. I guess this behavior results from the fact, that the list of items does not contain the actual items anymore...

I could work around this problem, by defining a CellTemplate, which explicitly binds to the Name of the item .

<telerik:GridViewComboBoxColumn.CellTemplate>
    <DataTemplate>
        <TextBlock Text="{Binding Name}" />
    </DataTemplate>
</telerik:GridViewComboBoxColumn.CellTemplate>


I have created this thread to understand WHY... and to ask if there is a better why to achieve a dynamic ItemsSource list.

Thanks and regards,

Franziska


Burim
Top achievements
Rank 1
 answered on 25 Sep 2012
1 answer
126 views
Do i have the ability to change the duration of bars within the RadTimeline
example
 lengthen or shorten duration
move bar to a different time while maintaining its duration.

Very much like you can do with the Gantt Chart
Tsvetie
Telerik team
 answered on 25 Sep 2012
2 answers
264 views
Hi,

In my application I've needed grouped items in the listbox. But grouping is not supported. So I've added my own grouping by using a DataTemplate and a Style for the ListBoxItems. My intention was to have Headers above items and the headers should not be clickable. So I have added a property "IsHeader" typeof boolean to my ViewModel and used it in the style declaration.

Here is the xaml declaration:

<DataTemplate x:Key="listItemTemplate">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="34" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <ContentControl Grid.Column="0" Template="{Binding Symbol}" Height="20" Width="20" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="3,0,3,3" />
        <TextBlock Grid.Column="1" Text="{Binding DisplayName}" Style="{StaticResource BasicFontStyle}" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="0,0,0,3" />
    </Grid>
</DataTemplate>
<Style TargetType="telerik:RadListBoxItem">
    <Style.Triggers>
        <DataTrigger Binding="{Binding Path=IsGroupHeader}" Value="True">
            <Setter Property="IsEnabled" Value="false"/>
        </DataTrigger>
        <Trigger Property="IsEnabled" Value="False">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition Height="5" />
                            </Grid.RowDefinitions>
                            <TextBlock Grid.Row="0" Style="{StaticResource TitleFontStyle}" Text="{Binding DisplayName}" HorizontalAlignment="Stretch" IsEnabled="True"  />
                            <Separator Grid.Row="1" Template="{StaticResource GeneralSeparatorTemplate}" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>                           
            </Setter>
        </Trigger>
    </Style.Triggers>
</Style>
 
As you see, in the style I have added a DataTrigger and bound it to the "IsHeader" property. If IsHeader is true, the setter sets the IsEnabled property of the item to false.
When running the application the Items with IsHeader=true are diabled and gray out. So to have no gray out in the style I have added a second trigger that triggers the IsEnabled property of the item. In the setter I add a ControlTemplate to the Template property of the Item including binding. After running the application the items with IsHeader=true are not gray out anymore and they are not clickabe.
You can use this also to set different templates for items in conditions. For example you can trigger a ViewModel property TaskPriority (low, normal, high) and set different ControlTemplates to the Template propterty of the ListItem. And if you do so, you don't need to implement TemplateSelectors.

I hope this little tip will help someone.

Regards,
Ralf
Ralf
Top achievements
Rank 1
 answered on 25 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?