locked
SettingFlyout in C++

    Question

  • First of all, please excuse me for my English (not very good :D)

    Recently, I've try to do some programming in C++ for Windows Metro. It's great, but for some reason, some feature in C++ is not there, such as Setting Flyout (which is currently available for Javascript only). After some search, I found Callisto (which is a very good library written by Tim Heuer). I decide to try porting this awesome library into C++ (just because I want to learn something new ^^)

    So I copy and paste, change semantics, etc... and voila, it's compiled. But not running :(. VS2012 can't debug (it said it can't not found the source code :-O)

    So this is where it stuck, right before it get typeid

    //flyout.cpp

    Flyout::Flyout() { this->DefaultStyleKey = Flyout::typeid; _windowBounds = Window::Current->Bounds; this->Loaded += ref new RoutedEventHandler(this, &Flyout::OnLoaded);

    And here is flyout.h

    using namespace Windows::Foundation;
    using namespace Windows::UI::Xaml;
    using namespace Windows::UI::Xaml::Controls;
    using namespace Windows::UI::Xaml::Controls::Primitives;
    using namespace Windows::UI::Xaml::Media;
    using namespace Windows::UI::Xaml::Media::Animation;
    
    enum SettingsFlyoutWidth
    {
    	Narrow = 346,
    	Wide = 646
    };
    
    ref class Flyout sealed : Windows::UI::Xaml::Controls::ContentControl
    {
    private:
    #pragma region Member Variables
    	// the inner Popup control
    	Popup^ _hostPopup;
    	// the bounds of the current window
    	Rect _windowBounds;
    	Button^ _backButton;
    	Grid^ _contentGrid;
    	static const int CONTENT_HORIZONTAL_OFFSET ; 
    	bool _isOpen;

    Since the code is not very short, I included the source file in this file (zip format, no password)

    http://www.mediafire.com/?6nn67lsvv9akaba

    Can anyone  help me out? I've had a long time in C#, and now, when I'm back to C++, I have absolutely no ideas :D

    • Changed type tng2903 Tuesday, July 17, 2012 4:31 AM Answered
    Monday, July 16, 2012 3:51 PM

Answers

  • There actually is already a fork on the source project for C++ you should look at that effort before you work too hard :-)

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Marked as answer by tng2903 Tuesday, July 17, 2012 4:31 AM
    Tuesday, July 17, 2012 12:47 AM

All replies

  • There actually is already a fork on the source project for C++ you should look at that effort before you work too hard :-)

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    • Marked as answer by tng2903 Tuesday, July 17, 2012 4:31 AM
    Tuesday, July 17, 2012 12:47 AM
  • There actually is already a fork on the source project for C++ you should look at that effort before you work too hard :-)

    Tim Heuer | Program Manager, XAML | http://timheuer.com/blog | @timheuer

    (if my post has answered your question, please consider using the 'mark as answer' feature in the forums to help others)

    I've followed the link on your blog to callisto's git page at https://github.com/timheuer/callisto/tree/master/src

    I've tried to sneak around but there is no C++ branch there :(, maybe it's hidden or something? :)


    Tuesday, July 17, 2012 3:30 AM
  • Ok, so here is the link to callisto in cpp. I feel very stupid right now :(

    https://github.com/scottdensmore/callisto/tree/cpp

    Tuesday, July 17, 2012 4:31 AM