Closed domyd closed 4 years ago
The proper way to do this would be by using the MessagingCenter
instead of internal methods.
I didn't know about that when I wrote the renderers, so in hindsight I should go back and fix it.
I agree that making it public isn't the way to go about it
@domyd Could you try the branch above and see if that solves your problem? You can see here how you'd raise the events using the messaging center: https://github.com/dotMorten/XamarinFormsControls/blob/Messaging/AutoSuggestBox/Platform/AutoSuggestBoxRenderer.cs#L148-L161
I'd probably merge this if it checks out in testing (gimme a few days)
That works for me 👍
Would you mind if I use dotMorten.Xamarin.Forms.AutoSuggestBox.WPF
as the package name and namespace? I figure that would make it clearer to users that those two are related. But it's totally fine if you're not comfortable with that.
@domyd The reason I use that prefix is to clearly state ownership, so I'd prefer you do not use that. I'd be more than happy to refer to your package in the readme, as well as in the nuget package description.
PR Merged
@domyd Just pushed v1.1.0
Hi,
I've now gotten around to creating an extension package out of my WPF implementation (#45). However, I'm stuck at raising the three events of the
AutoSuggestBox
...... as the methods that would allow me to do so (
RaiseSuggestionChosen
,NativeControlTextChanged
andRaiseQuerySubmitted
) areinternal
.The easiest way to allow this, of course, would be to make these methods
public
. And that would work. But I'm not sure it's the best way to go about doing that, and I can't really think of another way to solve this off the top of my head.Thoughts?