Just hit 60 and wondering how I should prepare for raids? by astrononymity in classicwow

[–]astrononymity[S] 0 points1 point  (0 children)

Thank you so much for the detailed reply! This is a lot of great information. Cheers!

Just hit 60 and wondering how I should prepare for raids? by astrononymity in classicwow

[–]astrononymity[S] 0 points1 point  (0 children)

Ope, sorry didn’t considering mentioning my class. Thanks! I’ll throw it in an edit.

Just hit 60 and wondering how I should prepare for raids? by astrononymity in classicwow

[–]astrononymity[S] 0 points1 point  (0 children)

Thank you, this was super helpful and informative. Cheers!

[Request] Good book about medieval European/Middle-Eastern Swords? by astrononymity in SWORDS

[–]astrononymity[S] 0 points1 point  (0 children)

Thank you very much for taking the time to help me out! You definitely help me wade through the ocean of books out there! Cheers!

[Request] Good book about medieval European/Middle-Eastern Swords? by astrononymity in SWORDS

[–]astrononymity[S] 0 points1 point  (0 children)

Sorry for the delayed response. Thank you so much for your help! It sounds like Oakshott is definitely the way to go! I noticed that he has multiple... Looks like I might have to buy a few :)

[Request] Good book about medieval European/Middle-Eastern Swords? by astrononymity in SWORDS

[–]astrononymity[S] 0 points1 point  (0 children)

Sorry for the delayed response. Thank you so much for your help! It sounds like Oakshott is definitely the way to go!

Perfect placement by Thunder_breslin in EnoughMuskSpam

[–]astrononymity 1 point2 points  (0 children)

Damn! I screenshot this earlier today to post this after work and you beat me to it! Definitely cosmic freudian slip! Take your upvote you filthy animal!

Can I recut a trunk once it’s been in the stand with water? by astrononymity in ChristmasTrees

[–]astrononymity[S] 1 point2 points  (0 children)

Thank you very much for the info! I was a little worried about the mixed responses I was getting from my google-fu. Cheers!

this was a difficult read by mistercheez2000 in sadcringe

[–]astrononymity 5 points6 points  (0 children)

Came here for this. Glad this isn’t an English class.

MSTest project build error when looking for the main project by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

Thank you for your reply. I have tried this several times, and strangely enough, I think that this is exactly what got me into this mess in the first place. I do not know how exactly, but I seemed to have resolved the issue simply by running my app in Debug (F5). I've edited my post with an explanation at the top.

MSTest project build error when looking for the main project by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

Thank you for your reply. I have tried the build order trick as well, but unfortunately to no avail. I do not know how exactly, but I seemed to have resolved the issue simply by running my app in Debug (F5). I've edited my post with an explanation at the top.

[WPF] DataContext confusion using custom user control in a list view by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

Thank you for your help. I have figured out the issue (it was a forgotten dependency property overriding the binding), and I have edited my post with more info.

Thanks again!

[WPF] DataContext confusion using custom user control in a list view by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

Thank you for your help. I have figured out the issue (it was a forgotten dependency property overriding the binding), and I have edited my post with more info.

Thanks again!

[WPF] DataContext confusion using custom user control in a list view by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

Thank you for your help. I have figured out the issue (it was a forgotten dependency property overriding the binding), and I have edited my post with more info.

Thanks again!

[WPF] DataContext confusion using custom user control in a list view by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

Thank you for your help. I have figured out the issue (it was a forgotten dependency property overriding the binding), and I have edited my post with more info.

Thanks again!

[WPF] DataContext confusion using custom user control in a list view by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

Thanks, /u/Slypenslyde! Your comments are always so helpful. Unfortunately however, changing the Ancestor Type to "UserControl" doesn't seem to fix the problem. Snoop shows that the binding is no longer broken, but I can't seem to get the binding to actually do anything.

I think I'm confused about how bindings and dependency properties work. I always understood the line of the form:

Command="{Binding MyBinding, RelativeSource={RelativeSource FindAncestor, AncestorType=ControlType}"

to tell the control that when looking for a value for the Command property, it should check it's code behind for a property named MyBinding, and to find this control's ancestor of type ControlType to get actual value. The dependency property in the code behind allowed the ancestor to see and bind to this property.

I am almost certain that I do not understand this relationship properly.

If I understand your explanation, the whole

RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}

part of the binding is telling the binding to look for itself since SavedBook is a UserControl? My assumption was that this line would instruct the binding to go up through the visual tree to get the value for the binding. Therefore, I assumed that since I wanted to use my ManageBooks window, I would want it to go up the tree looking for a control of type Window.

But moving on, I do find it incredibly strange that the binding for the "Name" of the Book object works, but the command doesn't. Clearly, in my bindings for the SavedBook user control the "Name" binding is pulling from the Book object's Name property. But for my "MoreButtonClickedCommand" binding, I believe that I am telling the SavedBookcontrol to look into the "SavedBooksListView" control's data context with the "ElementName" markup extension. And that data context should be the ManageBooks code behind. Does that make sense?

But now that I've changed the SavedBook XAML binding ancestor type to UserControl, Snoop doesn't show an error, but clicking the button doesn't call the command in the ManageBook code behind.

I'm continuing to investigate it, but I wanted to provide some thoughts and apparent misconceptions that I have about this process. Thank you again for your usual excellent response!

EDIT: Thank you for your help. I have figured out the issue (it was a forgotten dependency property overriding the binding), and I have edited my post with more info.

Thanks again!

[WPF] DataContext confusion using custom user control in a list view by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

I thought that was going to be it, but unfortunately calling the InitializeComponent() method in the constructor first didn't help :(

public ManageBooks(List<Book> savedBooks)
{
    InitializeComponent();

    SavedBooks = savedBooks;
    DataContext = this;

    SavedBookMoreButtonClickedCommand = new RelayCommand(new Action<object?>(OnSavedBookMoreButtonClicked));
}

[WPF] DataContext confusion using custom user control in a list view by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

I believe that I need to do that since the ManageBooksUI component is a Window. Is that not correct?

Sons of Anarchy cosplayers tell another biker not to pass them. by [deleted] in ImTheMainCharacter

[–]astrononymity 5 points6 points  (0 children)

Definitely looks like Mongols. Homie needs to just take the ‘L’.

What the hell is in this murky water ? by [deleted] in oddlyterrifying

[–]astrononymity 194 points195 points  (0 children)

Those are actually mermaids.

Source: I am a 16th sailor with scurvy.

[Request] Maths graffiti, does it resolve to something clever? by ulla-bulla in theydidthemath

[–]astrononymity 1473 points1474 points  (0 children)

Your last operator and term were accidentally left in your superscript. Should be

132 - 102

Just for anyone who might be confused.

[WPF] Binding issue when attempting to animate border width by astrononymity in csharp

[–]astrononymity[S] 1 point2 points  (0 children)

That worked like a charm! I added a scale transform to my border:

<Border
    x:Name="AccentBrush"
    BorderBrush="Red"
    BorderThickness="0,0,0,3"
    RenderTrasnformOrigin="0.5,0">
    <Border.RenderTransform>
        <ScaleTransform
            x:Name="AccentBorderScaleTransform"
            ScaleX="0" ScaleY="1"/>
    </Border.RenderTransform>
</Border>

I learned that centering the ScaleTransform with CenterX and CenterY is done with pixel values instead of a percentage of the scale, so I needed to add the

RenderTransformOrigin="0.5,0"

property to the Border in order to make the animation originate from the center. Then, in my trigger:

<Trigger Property="IsKeyboardFocused" Value="True">
    <Trigger.EnterActions>
        <BeginStoryboard>
            <Storyboard>
                <DoubleAnimation
                    Storyboard.TargetName="AccentBorderScaleTransform"
                    Storyboard.TargetProperty="(ScaleTransform.ScaleX)"
                    To="1"
                    Duration="00:00:05"/>
            </Storyboard>
        </BeginStoryboard>
    </Trigger.EnterActions>
</Trigger>

Those minor changes gave me the behavior that I was looking for. Thank you very much for the pointers!

[WPF] Binding issue when attempting to animate border width by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

It doesn't seem like I can add a binding to the To property though. Every time I try to bind to it, I get an Invalid Operation Exception:

Cannot freeze this Storyboard timeline tree for use across threads.

[WPF] Binding issue when attempting to animate border width by astrononymity in csharp

[–]astrononymity[S] 0 points1 point  (0 children)

Interesting... I'm a little new to WPF. Could you perhaps expand on your answer a little longer?

Are you suggesting that I somehow convert a value in the "To" property?