Click here to Skip to main content
16,007,809 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Listbox itemtemplate binding Pin
Gerry Schmitz24-Oct-15 5:35
mveGerry Schmitz24-Oct-15 5:35 
QuestionWPF ListBoxItem Quick Question Pin
Kevin Marois16-Oct-15 8:17
professionalKevin Marois16-Oct-15 8:17 
SuggestionRe: WPF ListBoxItem Quick Question Pin
J. Calhoun2-Nov-15 6:22
J. Calhoun2-Nov-15 6:22 
QuestionSelectionChanged event is not working Pin
Ashfaque Hussain15-Oct-15 1:52
Ashfaque Hussain15-Oct-15 1:52 
AnswerRe: SelectionChanged event is not working Pin
Richard Deeming15-Oct-15 2:48
mveRichard Deeming15-Oct-15 2:48 
QuestionCheckbox IsChecked property is not binding Pin
Ashfaque Hussain14-Oct-15 2:01
Ashfaque Hussain14-Oct-15 2:01 
AnswerRe: Checkbox IsChecked property is not binding Pin
Richard Deeming14-Oct-15 2:31
mveRichard Deeming14-Oct-15 2:31 
GeneralRe: Checkbox IsChecked property is not binding Pin
Ashfaque Hussain14-Oct-15 19:32
Ashfaque Hussain14-Oct-15 19:32 
AnswerRe: Checkbox IsChecked property is not binding Pin
Meshack Musundi14-Oct-15 23:54
professionalMeshack Musundi14-Oct-15 23:54 
GeneralRe: Checkbox IsChecked property is not binding Pin
Ashfaque Hussain15-Oct-15 1:56
Ashfaque Hussain15-Oct-15 1:56 
GeneralRe: Checkbox IsChecked property is not binding Pin
Meshack Musundi15-Oct-15 3:10
professionalMeshack Musundi15-Oct-15 3:10 
QuestionWPF Binding Issue Pin
Saurabh18cs12-Oct-15 17:55
Saurabh18cs12-Oct-15 17:55 
QuestionRe: WPF Binding Issue Pin
Meshack Musundi13-Oct-15 20:13
professionalMeshack Musundi13-Oct-15 20:13 
AnswerRe: WPF Binding Issue Pin
Priyank612515-Oct-15 0:24
Priyank612515-Oct-15 0:24 
QuestionGet Info Pin
ASPDevloper8-Oct-15 18:47
ASPDevloper8-Oct-15 18:47 
AnswerRe: Get Info Pin
Mycroft Holmes8-Oct-15 20:26
professionalMycroft Holmes8-Oct-15 20:26 
Questionsetting image in nested menu Pin
HailStorm26-Oct-15 4:05
HailStorm26-Oct-15 4:05 
AnswerRe: setting image in nested menu Pin
Pete O'Hanlon6-Oct-15 4:30
mvePete O'Hanlon6-Oct-15 4:30 
GeneralRe: setting image in nested menu Pin
HailStorm26-Oct-15 19:26
HailStorm26-Oct-15 19:26 
GeneralRe: setting image in nested menu Pin
Pete O'Hanlon6-Oct-15 21:01
mvePete O'Hanlon6-Oct-15 21:01 
AnswerRe: setting image in nested menu Pin
Richard Deeming6-Oct-15 5:16
mveRichard Deeming6-Oct-15 5:16 
QuestionAvalon 2.0 with MVVM and 2 anchorable panes Pin
marc borgers1-Oct-15 7:10
marc borgers1-Oct-15 7:10 
QuestionNeed Some Help With This Design Pin
Kevin Marois22-Sep-15 5:42
professionalKevin Marois22-Sep-15 5:42 
Overview
I'm writing this Timeline user control[^]

It's internal design looks like this
[^]

Question
There is a timer that moves the InnerCanvas to the left at regular intervals. This is Live mode.

The Now line is a child of the InnerCanvas, so that when the user slides it, the Now line will move also. Once the user slides the InnerCanvas, the control is then in History Mode. A History line appears when the Now line is and the Now line moves right with the timer ticks. So basically the user can see where Now WAS and where it IS relative to the slide amount.

In addition, in Live Mode, when the Now line is 3/4 of the way into the current period (1 Day, 3 Days, 5 Days), then an additional period is added to the right.

The problem is that in Live Mode, the now line should ALWAYS be 200 relative to the right side of the OutterCanvas.

There's got to be a way to know, regardless of the size or position of the InnerCanvas, to position it there.

My first pass was this
private void setupNowLine(double distanceToMove = 0)
{
    // Get the left of the inner container
    double left = Canvas.GetLeft(innerCanvas);

    if (distanceToMove == 0)
    {
        distanceToMove = left - originalInnerCanvasLeft;
    }

    // Recalulcate the new position
    nowLinePosition = (INNER_CANVAS_WIDTH + distanceToMove) - NOW_LINE_POSITION;

    // Position the Now line
    Canvas.SetLeft(nowLine, nowLinePosition);
}

But it doesn't work. For the life of me I can't get the calculations right. I could use some help here.

Thanks
If it's not broken, fix it until it is

SuggestionRe: Need Some Help With This Design Pin
Richard Deeming22-Sep-15 6:10
mveRichard Deeming22-Sep-15 6:10 
GeneralRe: Need Some Help With This Design Pin
Kevin Marois22-Sep-15 6:32
professionalKevin Marois22-Sep-15 6:32 

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.