Open RobbiewOnline opened 7 years ago
Thanks a lot for your feedback. Agree that the walkthrough needs to be improved, specially clarifying when to use the standard player or the SDK.
Regarding your questions:
The SDK must be used for subtypes to work. The assembly that includes the subtype must be registered against Gorilla Config
object.
The Missing Data banner is just a warning to tell you that there is no design-time data defined for all/some of the bindings you have in your page. Those bindings require data, e.g. a list requires a collection of items, if not, it will be empty. If you tap in the banner, it will give you more details about which bindings are missing. Please read the release notes for more information. The goal of the banner was to help you, not to bother you :(. Did you tap it? Or didn't you feel it was something you can tap?
The main reason to replace the LoadApplication
is to load Gorilla UI instead of your app UI and let Gorilla take control. Usually there is no need to reference you app. Just let gorilla to create an app for you. Additionally, at this point is also when you configure Gorilla. At runtime, the player needs a explicit reference to each of the assemblies involved in the preview of your pages (e.g. the assembly that includes your pages BaseContentType
), since those assemblies can't always be discovered at runtime.
Conditional compilation can be used. Usually we define a Gorilla configuration and we conditionally do Gorilla LoadApplication
or the standard LoadApplication
. The Gorilla configuration is used while designing.
As I mentioned in 3, you need to pass Gorilla an instance of the Assembly
object for each of the assemblies involved in your preview. By analyzing the project we can get the list of names, yes, but just the names are not enough. We need to reference them in code so we are sure they are not removed from the final app (linker) and we need to introspect them too.
Did you get this error by specifying WhiteSmoke as a color in the DesignTimeData.json
?
If your page base types requires Ninject to fill some parameters in the constructor, you will not be able to preview them with Gorilla.
Regarding the intellisense issue, we will take a look.
Hi, do you have a clean manual how to use basecontentpage pattern with Gorilla? I have not been able to get this working with derivedpages project.
Intellisense is still broken in v1.5.0 (VS2017 15.9.5). Should I open a new issue for this?
Steps to reproduce:
Result:
Workaround:
Hi,
VS2017 on Windows 10 64Bit...
I have to admit that the first time I installed Gorilla and tried the process as a virgin I was very confused.
I had downloaded the official app to my device, yet during the startup guide it was telling me to load a sample project and deploy that Gorilla app to my device. This seemed odd; I was expecting to the project XAML to be previewable into the official Gorilla app.
The quick start multi-page wizard I think confuses the situation, because you are included to follow the first tab, then the next and you can skip installing the app from the app store if you have any custom XAML / libraries. Perhaps the first step is asking whether you have a basic Xamarin.Forms app such as.. and don't have custom renderers, then install the app, otherwise follow the far more complicated 2nd tab?
I couldn't be bothered in installing the sample app, so I jumped ahead to try previewing XAML in my project.
Unfortunately I started to get the error 'Root XAML, element unrecognized, nothing to display.' with the warning 'Tag local:BaseContentPage was removed.'.
My conclusion was that it didn't like BaseContentPage, so I changed my markup as a test from
<local:BaseContentPage> ... </local:BaseContentPaage>
to
<ContentPage> ... </ContentPage>
Then everything started rendering in the official Gorilla player, yay! I do see an error banner flash up 'Missing Data' and I don't know whether that is because I'm not extending my base class, or something else is wrong.
I'm very keen to use Gorilla fully, but I was lead to this URL htps://github.com/UXDivers/Gorilla-Player-Support/wiki/Gorilla-SDK which is very specific to getting it working with a specific project, it doesn't really explain which parts are essential for every project, or just that sample project.
It talks about removing this line
LoadApplication(new App());
But I'm using IoC (Ninject)..
app = kernel.Get<App>(); LoadApplication(app);
But if I change that chunk to this..
LoadApplication (UXDivers.Gorilla.Droid.Player.CreateApplication( this, new UXDivers.Gorilla.Config("Good Gorilla") // Register Grial Shared assembly .RegisterAssemblyFromType<UXDivers.Artina.Shared.CircleImage>() // Register UXDivers Effects assembly .RegisterAssembly(typeof(UXDivers.Effects.Effects).Assembly) // FFImageLoading.Transformations .RegisterAssemblyFromType<FFImageLoading.Transformations.BlurredTransformation>() // FFImageLoading.Forms .RegisterAssemblyFromType<FFImageLoading.Forms.CachedImage>() ));
Then where is the reference to my app? Or doesn't it matter because you're justing previewing the selected XAML file?
If it doesn't matter, then am I not better to add a new environment called 'Gorilla' then conditionally replace that section when previewing? Can the nuget also be a conditional requirement when previewing so it's not accidentally included in a release?
Additionally I have noticed that when I'm editing the XAML, it's no longer showing intellisense/completion options. Is this the Gorilla Visual Studio plugin getting in the way? I really need to see the property options when typing - I don't know Xamarin well enough to know all of the options.
In summary...
Need to have my subtypes working... BaseContentType
What is 'Missing Data' all about?
The instructions are not clear whats essential in the LoadApplication part - I don't see where to reference my App class
can environment & conditional compilation be used
Why do assemblies have to be added through the variant LoadApplication if the assemblies are included via nuget then aren't they discoverable? When do you add an assembly through LoadApplication? Presumably static classes referenced in the XAML are resolved okay?
I get an error 'Missing Design Time Data' - 'Cannot covert 'WhiteSmoke' into Xamarin.Forms.Color - how to resolve this?
Many thanks Rob.