Click here to Skip to main content
15,888,286 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: WPF ComboBox Synchronization Problem Pin
Simon Bang Terkildsen26-Jul-11 3:52
Simon Bang Terkildsen26-Jul-11 3:52 
QuestionHow to Update Rows in Silverlight 4 Data grid Using WCF service ? Pin
Sanjay_8724-Jul-11 21:24
Sanjay_8724-Jul-11 21:24 
AnswerRe: How to Update Rows in Silverlight 4 Data grid Using WCF service ? Pin
Abhinav S24-Jul-11 21:41
Abhinav S24-Jul-11 21:41 
Questioncan't edit tabitem Pin
david131324-Jul-11 5:35
david131324-Jul-11 5:35 
AnswerRe: can't edit tabitem Pin
Mark Salsbery24-Jul-11 8:19
Mark Salsbery24-Jul-11 8:19 
GeneralRe: can't edit tabitem Pin
david131324-Jul-11 8:26
david131324-Jul-11 8:26 
GeneralRe: can't edit tabitem Pin
Mark Salsbery24-Jul-11 8:28
Mark Salsbery24-Jul-11 8:28 
QuestionClosable Tabs Pin
jgalak23-Jul-11 8:03
jgalak23-Jul-11 8:03 
I'm trying to make a tab with a close button (a la Firefox and pretty much everything else that uses tabs), and was trying to follow this tutorial:

How to add a Close button to a WPF TabItem[^]

Unfortnately, it doesn't seem to work. The problem appears to be that in the ClosableHeader class there is a button, defined in the xaml, with
Name="button_close"
It's then referenced in the C# code for the ClosableTab class as follows:

// Create an instance of the usercontrol
CloseableHeader closableTabHeader = new CloseableHeader();

// Assign the usercontrol to the tab header
this.Header = closableTabHeader;

// Attach to the CloseableHeader events (Mouse Enter/Leave, Button Click, and Label resize)
closableTabHeader.button_close.MouseEnter += new MouseEventHandler(button_close_MouseEnter);
closableTabHeader.button_close.MouseLeave += new MouseEventHandler(button_close_MouseLeave);
closableTabHeader.button_close.Click += new RoutedEventHandler(button_close_Click);
closableTabHeader.label_TabTitle.SizeChanged += new sizeChangedEventHandler(label_TabTitle_SizeChanged);


This generates compile-time errors for every line that contains the text
closableTabHeader.button_close
with the message "'WGPM.Views.CloseableHeader' does not contain a definition for 'button_close' and no extension method 'button_close' accepting a first argument of type 'WGPM.Views.CloseableHeader' could be found (are you missing a using directive or an assembly reference?)" (WGPM.Views is the namespace I'm using).

What am I missing? Can I not just refer to a named control like that?

Thanks,
Juliean.
AnswerRe: Closable Tabs Pin
SledgeHammer0123-Jul-11 11:42
SledgeHammer0123-Jul-11 11:42 
GeneralRe: Closable Tabs Pin
jgalak23-Jul-11 14:48
jgalak23-Jul-11 14:48 
GeneralRe: Closable Tabs Pin
SledgeHammer0123-Jul-11 15:01
SledgeHammer0123-Jul-11 15:01 
GeneralRe: Closable Tabs Pin
Mark Salsbery23-Jul-11 15:36
Mark Salsbery23-Jul-11 15:36 
GeneralRe: Closable Tabs Pin
jgalak24-Jul-11 9:21
jgalak24-Jul-11 9:21 
GeneralRe: Closable Tabs Pin
Mark Salsbery24-Jul-11 9:26
Mark Salsbery24-Jul-11 9:26 
GeneralRe: Closable Tabs Pin
jgalak24-Jul-11 9:36
jgalak24-Jul-11 9:36 
GeneralRe: Closable Tabs Pin
Mark Salsbery24-Jul-11 9:41
Mark Salsbery24-Jul-11 9:41 
GeneralRe: Closable Tabs Pin
SledgeHammer0124-Jul-11 9:54
SledgeHammer0124-Jul-11 9:54 
GeneralRe: Closable Tabs Pin
Mark Salsbery24-Jul-11 11:17
Mark Salsbery24-Jul-11 11:17 
GeneralRe: Closable Tabs Pin
SledgeHammer0124-Jul-11 9:52
SledgeHammer0124-Jul-11 9:52 
GeneralRe: Closable Tabs Pin
jgalak27-Jul-11 14:31
jgalak27-Jul-11 14:31 
QuestionSimple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Manjeet patel22-Jul-11 3:15
Manjeet patel22-Jul-11 3:15 
AnswerRe: Simple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Ian Shlasko22-Jul-11 3:37
Ian Shlasko22-Jul-11 3:37 
GeneralRe: Simple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Manjeet patel22-Jul-11 3:48
Manjeet patel22-Jul-11 3:48 
AnswerRe: Simple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Abhinav S22-Jul-11 4:05
Abhinav S22-Jul-11 4:05 
AnswerRe: Simple and good way to Windows application development using C# + WPF + MVVC + prism 4 ? Pin
Richard MacCutchan22-Jul-11 4:25
mveRichard MacCutchan22-Jul-11 4:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.