Telerik Forums
UI for WPF Forum
4 answers
160 views
Hello

I use  the RadPanelBar control
I build the hirarchy in the xaml page
some of the items have no children but thy still have the arrow (<) in the side
how can I remove it?

here is the code
<telerikNavigation:RadPanelBar x:Name="pb" Margin="5" Width="180" BorderBrush="#9098a3" 
                    BorderThickness="1" HorizontalAlignment="Left" ExpandMode="Multiple">  
            <telerikNavigation:RadPanelBarItem> 
                <telerikNavigation:RadPanelBarItem.Header> 
                    <TextBlock Text="מבט ענף" Height="13" Margin="5 2 5 2" /> 
                </telerikNavigation:RadPanelBarItem.Header> 
                <telerikNavigation:RadPanelBarItem Header="תוכניות עבודה" /> 
                <telerikNavigation:RadPanelBarItem Header="ממתינות לתקצוב" /> 
                <telerikNavigation:RadPanelBarItem Header="הצעות לתוכנית" /> 
            </telerikNavigation:RadPanelBarItem> 
            <telerikNavigation:RadPanelBarItem> 
                <telerikNavigation:RadPanelBarItem.Header> 
                    <TextBlock Text="מבט מחלקה" Height="13" Margin="5 2 5 2" /> 
                </telerikNavigation:RadPanelBarItem.Header> 
                    <telerikNavigation:RadPanelBarItem Header="תוכניות עבודה" /> 
                    <telerikNavigation:RadPanelBarItem Header="ממתינות לתקצוב" /> 
                    <telerikNavigation:RadPanelBarItem Header="הצעות לתוכנית" /> 
                </telerikNavigation:RadPanelBarItem> 
                        <telerikNavigation:RadPanelBarItem IsEnabled="True">         
                    <telerikNavigation:RadPanelBarItem.Header> 
                        <TextBlock Text="ניהול המערכת" Height="13" Margin="5 2 5 2" /> 
                    </telerikNavigation:RadPanelBarItem.Header> 
                </telerikNavigation:RadPanelBarItem> 
             
        </telerikNavigation:RadPanelBar> 

Thanks.
Tina Stancheva
Telerik team
 answered on 24 Aug 2010
2 answers
96 views
I started with the Telerik WPF Q2 2010 examples.
I went to Controls -> DATA -> GridView -> Appearance -> Custom Row Layout

I am using a slightly modified version of this now.  What I want is to change the four gradient stops for the main row background dynamically based on object properties of the binding.  The problem is that my template is 75 lines long and I think it seems very inefficient to duplicate this six times (for siz possible gradient values) and use a TemplateSelector.  Instead I'd like to modify the border background property.

Here's a small snippet of code:

<ControlTemplate x:Key="TCCustomRowTemplate" TargetType="telerik:GridViewRow">
    <Border x:Name="rowsContainer" Background="#FF525252" Padding="8,8,8,0" >
        <Border x:Name="selectedRow" BorderThickness="1" BorderBrush="#FF000000" 
            Background
="{StaticResource TC_INRowBackgroundSelected}>

How can I modify this background to be a different static resource dependant on my object?

Milan
Telerik team
 answered on 24 Aug 2010
1 answer
199 views
Hi 
I've modified the TabControl but would like to force the scrollviewer repeat buttons to scroll one full tab at a time but cannot find a way to do this.

I thought I might be able to add something like Command="ScrollBar.LineDownCommand" to the repeat button - no joy though!

Any help would be much appreciated.

Tina Stancheva
Telerik team
 answered on 23 Aug 2010
1 answer
54 views
Hi,
I am trying to Wrap RadOutlookBar and make MYOUTLOOKBAR so that i can expose only few properties in MYOUTLOOKBAR.
In this senario i need to add radoutlookbarItems to MYOUTLOOKBAR.

Even if i add MYoutlookbarItem to MYOUTLOOKBAR ..In xaml i was able to look at the change.
But in design i  dont see any Item getting added to the Outlookbar.

if add content to this Newly added MYOutlookBarItem from properties tab, i get  an error message saying that

"Property Value is not Valid"
(in detail: Property "content" does not support string to value conversation)

How to add items to outlookbar so that the items of the outlookbar should support exposed properties of radoutlookbar control?

Here is an example code...for Items property of MyOutlookbar.cs

#region

 

 

Property: Items

 

 

 

private MYOutlookBarItemCollection _items;

 

 

 

public MYOutlookBarItemCollection Items

 

{

 

 

get

 

 

 

 

{

 

 

if (_items == null)

 

{

_items =

 

new MYOutlookBarItemCollection ();

 

}

 

 

return _items;

 

}

}

 

 

#endregion

 

 

 

 

 

 

The above code exposes the items property in MYoutlookbar


MYOutlookBarItemCollection.cs will be a separate will which contains
public class MYOutlookBarItemCollection: ObservableCollection<MYOutlookBarItem>

 

{

}

 

 

 


Here is an example code...for content property of MyOutlookbarItem.cs


#region

 

 

Property: Content

 

 

 

public object Content

 

{

 

 

get { return (object)GetValue(ContentProperty); }

 

 

 

set { SetValue(ContentProperty, value); }

 

}

 

 

public static readonly DependencyProperty ContentProperty =

 

 

 

DependencyProperty.Register(

 

 

 

"Content", typeof(object), typeof(MyOutlookBarItem),

 

 

 

new FrameworkPropertyMetadata

 

{

PropertyChangedCallback = (obj, e) =>

{

(obj

 

as MyOutlookBarItem).UpdateContent((object)e.NewValue);

 

}

});

 

 

private void UpdateContent(object sel)

 

{

OutlookBarItem.Content = sel;

}

#endregion

 Can you guys help me..

Thanks,
Deepz

Tina Stancheva
Telerik team
 answered on 23 Aug 2010
3 answers
138 views
Hello,

The ItemTemplateSelector  for the RadTileView does not seem to be working. I can set the property and it is set correctly, but it does not run the SelectTemplate Method. I am using the current Build (0714).

Would someone send code that works with this in the current version?

Thanks,
Matt
Tina Stancheva
Telerik team
 answered on 23 Aug 2010
3 answers
230 views

I am using a heirarchical grid and there are times the childGrid could be null. how to check that condition?

 

GridViewRow

 

grdRow = (GridViewRow)grdCell.ParentRow;

 

 

RadGridView

 

childGrid = grdRow.ChildrenOfType<RadGridView>().FirstOrDefault();


Please let me know

Thanks
Sathish.K

 

Milan
Telerik team
 answered on 23 Aug 2010
4 answers
245 views

I currently have a Loop going through a cube which returns the name (Caption) of its items.
However as this is an OLAP cube I want to distinguish between user defined and attribute hierarchies. I thought the best way to do this would be to give each one a different color (so give User Defined Hierarchies a blue font and Attribute Hierarchies a red font for example).

I thought this would be simple but the method I tried below threw alot of errors, while other methods turned all of the items a particular colour rather than just the items I wanted.

Has anyone got an idea of how I could change an items colour depending on its value??


Window1.xaml.cs

foreach (Hierarchy hierarchy in dimension.Hierarchies)
                {

                    Dimension HierarchyItem = new Dimension();
                    HierarchyItem.Caption = hierarchy.Caption;
                    DimensionItem.SubDimensions.Add(HierarchyItem);
                    HierarchyItem.IsDraggable = true;

              
if (HierarchyItem.Caption == "Account Number")
                        HierarchyItem.Caption = Brushes.Red)
                        else if (HierarchyItem.Caption == "Customer Number")
                        HierarchyItem.Caption = Brushes.Blue)

James
Top achievements
Rank 1
 answered on 23 Aug 2010
1 answer
140 views
I am using percentages in my graphs but the y-axis label as well as the item labels show 100% as 100.00% or 95% as 95.00%. Is there a way to make it show only whole numbers?

Thanks,

Billy Jacobs
Sia
Telerik team
 answered on 23 Aug 2010
0 answers
201 views
Well, my question is not related with the radwindow but I hope you guys can help :)

I have a windowless WPF application and I want it to be draggable by the users.

I can make it dragglabe by returning HTCAPTION in the WM_NCHITTEST message like this:

protected override void OnSourceInitialized(EventArgs e)
    {
        HwndSource hwndSource = (HwndSource)HwndSource.FromVisual(this);
        hwndSource.AddHook(WndProcHook);
        base.OnSourceInitialized(e);
    }
 
private static IntPtr WndProcHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handeled)
    {
        if (msg == 0x0084) // WM_NCHITTEST
        {
            handeled = true;
            return (IntPtr)2; // HTCAPTION
        }
        return IntPtr.Zero;
    }

But then, the click event of the buttons inside the application doesn't work...

-----

When I add "DragMove" to the "MouseLeftButtonDown":

this.MouseLeftButtonDown += delegate { DragMove(); };

Then the problem is, if I click one of the buttons, I get an InvalidOperationException.

User interface :)

Does anyone have something in mind for this?
koray
Top achievements
Rank 1
 asked on 23 Aug 2010
3 answers
761 views

Good morning, afternoon, evening,

I am having trouble figuring out how I can center a RadWindow using WindowStartupLocation.CenterOwner when I open it from a non-wpf application.

I used the following code in my winform app to open a dialog that is a System.Windows.Window.  When I convert it to a RadWindow, it doesn't work and I am at a loss as to how to duplicate functionality.

 

 

 

var dlg = new MyDialog();

 

System.Windows.Interop.

 

WindowInteropHelper hwndHelper = new System.Windows.Interop.WindowInteropHelper(dlg);

 

hwndHelper.Owner =

 

new IntPtr(Globals.ThisAddIn.Application.Hwnd);

 

dlg.ShowDialog();

How can I center the window?

Please assist.

Thanks,
Alan

PS.  I have a support agreement but decided to post here so that others might benefit from response.

Konstantina
Telerik team
 answered on 23 Aug 2010
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
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
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
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?