I have a situation where I am trying to add items to a collection from a background thread. The collection is bound to a RadTabControl. When I add the items through the UI thread I have no issues. When I do it from a backgroundworker the current tabs will all lose focus on whatever selected items they had.
Is there another option to show a busy indicator without having to use a background worker?
Perhaps I am going about this the wrong way. My timeline contains both items with a duration and items that are an instant in time. E.g. the duration items represent a project, and the instants are milestones in the project. I need to associate a duration with it's instants visually, so I am using the RowIndex to place them on the same row.
It worked fine until I introduced a TimeLineItemTemplate (below) which has a height greater than the default duration item height. The duration items appear as expected , but the instant items appear in their original vertical position.
I'm running the SDK samples browser's TimeLineItemRowIndex project, with the modifications mentioned above.
I've attached an image that shows the timeline with and without the template.
Thanks.
<
DataTemplate
x:Key
=
"TimelineWithDurationTemplate"
>
<
Border
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
TextBlock
Grid.Row
=
"1"
Text
=
"{Binding DataItem.Title}"
Margin
=
"0,4,0,0"
/>
<
Rectangle
Grid.Row
=
"0"
Height
=
"7"
VerticalAlignment
=
"Center"
Fill
=
"BlueViolet"
/>
</
Grid
>
</
Border
>
</
DataTemplate
>
Hi team,
I find the pop-up containing the RadMenuItem is always aligning to the right against the clicked parent Menu Item. I want to it be automatically detect the boundary, just like the context menu windows desktop. Any solutions?
Wishes,
Jingfei
Hi team,
I am reading the implicite style of radbutton, and find that the storyborad of mouse over state is below
<
VisualState
x:Name
=
"MouseOver"
>
<
Storyboard
>
<
DoubleAnimation
Duration
=
"0"
To
=
"1"
Storyboard.TargetProperty
=
"(UIElement.Opacity)"
Storyboard.TargetName
=
"OuterMouseOverBorder"
/>
</
Storyboard
>
</
VisualState
>
And my question is why use UIElement.Opacity here instead just Opacity, like other states' storyborad do?
Thanks,
Jingfei
Hi team,
When I try to customize the styles and templates of RadButton, I am blocked by the states transition of RadButton. There are focused and unfocused states, also there are normal, pressed and mouse over states. The normal, pressed and mouse over states are straightforward to comprehesive. However, i don't quite understand how the focused and unfocused states work when a user click the button.
Thanks,
Jingfei
Hi there,
I have following layouts
<
Border
>
<
context
menu is here>
<
other
child items>
</
Border
>
But i found that i need to carefully click the items to so that the context menu can be triggered. If clicking to a blank area, the upper level context menu is triggered.
How do i avoid this?
public
override
Style SelectStyle(
object
item, DependencyObject container)
{
if
(item
is
Club)
{
Club club = item
as
Club;
if
(club.StadiumCapacity > 50000)
{
return
BigStadiumStyle;
}
else
{
return
SmallStadiumStyle;
}
}
return
null
;
}